| MATLAB Application Program Interface | Search  Help Desk |
| mxGetJc | Examples See Also |
Get the jc array of a sparse matrix
C Syntax
#include "matrix.h" int *mxGetJc(const mxArray *array_ptr);
Arguments
array_ptrmxArray.
Returns
A pointer to the first element in thejc array, if successful; otherwise, returns NULL. The most likely cause of failure is specifying an array_ptr that points to a full (nonsparse) mxArray.
Description
UsemxGetJc to obtain the starting address of the jc array. The jc array is an integer array having n+1 elements where n is the number of columns in the sparse mxArray. The values in the jc array indirectly indicate columns containing nonzero elements. For a detailed explanation of the jc array, see mxSetJc.
Examples
Seefulltosparse.c in the refbook subdirectory of the examples directory.
For additional examples, see explore.c in the mex subdirectory of the examples directory; see mxgetnzmax.c, mxsetdimensions.c, and mxsetnzmax.c in the mx subdirectory of the examples directory.
See Also
mxGetIr, mxSetIr, mxSetJc