Using the C++ Math Library | ![]() ![]() |
Sparse Matrices
The MATLAB C++ Math Library includes routines to create and manipulate sparse matrices. 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.
The following table lists the MATLAB C++ Math Library routines to create sparse matrices and perform some basic tasks with 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 MATLAB C++ Math Library Reference.
![]() | Example Program: Creating Arrays and Array I/O (ex1.cpp) | Creating a Sparse Matrix | ![]() |