CSR sparse matrix
Version 1.0.0 (3.85 KB) by
Christoph Lohmann
Work with sparse matrices using CSR matrix format to significantly improve performance of matrix-vector multiplications.
Sparse matrix class emulating the CSR matrix format by internaly storing A.'.
This class can singificantly improve the performance of your application when the code is dominated by matrix-vector multiplcations.
Usage: Create a sparseCSR matrix using the syntax
A = sparseCSR();
A = sparseCSR(B);
A = sparseCSR(N, M);
A = sparseCSR(I, J, V);
A = sparseCSR(I, J, V, N, M);
where B can be either a full or a sparse matrix, N, M are the number of rows and columns, and I, J, and V are the row, column, and value vectors of A.
Convert a sparseCSR matrix using sparse(A) or full(A) into a sparse or dense matrix.
Several functions are overloaded aiming to naively use a sparseCSR matrix instead of a sparse matrix.
Cite As
Christoph Lohmann (2026). CSR sparse matrix (https://www.mathworks.com/matlabcentral/fileexchange/181316-csr-sparse-matrix), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2025a
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
