Using the C Math Library | ![]() ![]() |
Sparse Matrices
The MATLAB C Math Library includes routines to create and manipulate sparse arrays. Sparse matrices provides a more efficient storage format for two-dimensional numeric arrays with few non-zero elements. Only two-dimensional numeric arrays can be converted to sparse storage format.
This table lists the MATLAB C Math Library routines used to create sparse matrices and perform some basic operations on them. The sections that follow provide more detail about using these routines. For more detailed information about using sparse arrays, see Using MATLAB. For more detailed information about any of the library routines, see the online MATLAB C Math Library Reference.
![]() | Example Program: Creating Numeric Arrays (ex1.c) | Creating a Sparse Matrix | ![]() |