| MATLAB Application Program Interface | Search  Help Desk |
| mxIsSparse | Examples See Also |
C Syntax
#include "matrix.h" bool mxIsSparse(const mxArray *array_ptr);
Arguments
array_ptrmxArray.
Returns
1 ifarray_ptr points to a sparse mxArray; otherwise, returns 0. A return value of 0 means that array_ptr points to a full mxArray or that array_ptr does not point to a legal mxArray.
Description
UsemxIsSparse to determine if array_ptr points to a sparse mxArray. Many routines (for example, mxGetIr and mxGetJc) require a sparse mxArray as input.
Examples
Seephonebook.c in the refbook subdirectory of the examples directory.
For additional examples, see mxgetnzmax.c, mxsetdimensions.c, and mxsetnzmax.c in the mx subdirectory of the examples directory.
See Also
mxGetIr, mxGetJc, mxIsFull