Create sparse matrix
S = sparse(
generates
a sparse matrix i,j
,v
)S
from the triplets i
, j
,
and v
such that S(i(k),j(k)) = v(k)
.
The max(i)
-by-max(j)
output
matrix has space allotted for length(v)
nonzero
elements. sparse
adds together elements in v
that
have duplicate subscripts in i
and j
.
If the inputs i
, j
, and v
are
vectors or matrices, they must have the same number of elements. Alternatively,
the argument v
and/or one of the arguments i
or j
can
be scalars.
accumarray
| diag
| find
| full
| issparse
| nnz
| nonzeros
| nzmax
| spalloc
| speye
| spones
| sprandn
| sprandsym
| spy