| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
#include "matrix.h" mwIndex *mxGetJc(const mxArray *pm);
mwPointer mxGetJc(pm) mwPointer pm
Pointer to the first element in the jc array, if successful, and NULL in C (0 in Fortran) otherwise. Possible causes of failure include
Specifying a full (nonsparse) mxArray.
Specifying a value for pm that is NULL in C (0 in Fortran). This usually means that an earlier call to mxCreateSparse failed.
Use mxGetJc 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.
See fulltosparse.c in the matlabroot/extern/examples/refbook folder .
Additional examples:
explore.c in the matlabroot/extern/examples/mex folder
mxgetnzmax.c, mxsetdimensions.c, and mxsetnzmax.c in the matlabroot/extern/examples/mx folder
mxGetIr, mxGetNzmax, mxSetIr, mxSetJc, mxSetNzmax
![]() | mxGetIr (C and Fortran) | mxGetLogicals (C) | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |