FUNCTION REFERENCE
spones
Replace the nonzeros of an array by ones.
Replace the nonzeros of an array by ones.
Syntax
R = spones(S)Returns a double sparse array with ones where S has nonzeros.
Example
full(spones(sparse([0 5; -2 0]))) % [0 1; 1 0]Differences from MATLAB: none known.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.