spalloc
Allocate space for sparse matrix
Syntax
Description
Examples
Input Arguments
Limitations
Both matrix dimensions,
m
andn
, must be smaller than2^31-1
on 32-bit platforms, or2^48-1
on 64-bit platforms.
Tips
When you assign several times into a matrix you created with
spalloc
, the preallocated memory can prevent repeated reallocations. However, assigning into a sparse matrix is still a relatively expensive operation, which should usually be avoided if it can easily be replaced by one of the following:
Extended Capabilities
Version History
Introduced before R2006a