SparseArray
SparseArray(nestedList)
create a sparse array from a
nestedList
structure.
SparseArray(arrayRules, listOfIntegers, defaultValue)
create a sparse array from
arrayRules
with dimensionlistOfIntegers
and undefined elements are havingdefaultValue
.
SparseArray(Automatic, listOfIntegers, defaultValue, crsList)
create a sparse array from the compressed-row-storage
crsList
with dimensionlistOfIntegers
and undefined elements are havingdefaultValue
.
See
Examples
>> SparseArray({{1, 1} -> 1, {2, 2} -> 2, {3, 3} -> 3, {1, 3} -> 4})SparseArray(Number of elements: 4 Dimensions: {3,3} Default value: 0)
>> SparseArray({{1, 1} -> 1, {2, 2} -> 2, {3, 3} -> 3, {1, 3} -> 4}, Automatic, 0)SparseArray(Number of elements: 4 Dimensions: {3,3} Default value: 0)
Related terms
SparseArrayQ, MatrixForm, Normal
Implementation status
- ✅ - full supported