SPINIT

Sparse matrix initialization and update utility.

You are now following this Submission

This utility can be useful when you need to update a sparse matrix values
without changing its sparsity pattern.

Since MATLAB uses CSC (Compressed Sparse Column) format for sparse matries, the non-zeroes are stored in an array, which can be safely overwritten in order to update the matrix, while preserving the sparsity pattern.

This can be done much faster than re-allocating the whole sparse matrix again, when only its values change.

The source code can be found at GitHub:
https://github.com/romanz/thesis/tree/master/utils/spinit

Cite As

Roman (2026). SPINIT (https://www.mathworks.com/matlabcentral/fileexchange/30293-spinit), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Sparse Matrices in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.3.0.0

Fix tags

1.2.0.0

Update GitHub URL.

1.1.0.0

Update MATLAB version.

1.0.0.0