matlab mxgetir函数语法

发表matlab mxgetir函数相关文章
一句话说明: Sparse matrix IR array

mxGetIr (C and Fortran)

Sparse matrix IR array

C Syntax

#include "matrix.h"
mwIndex *mxGetIr(const mxArray *pm);

Fortran Syntax

mwPointer mxGetIr(pm)
mwPointer pm



Pointer to a sparse mxArray


Pointer to the first element in the ir 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 mxGetIr to obtain the starting address of the ir array. The ir array is an array of integers. The length of ir is nzmax, the storage allocated for the sparse array, or nnz, the number of nonzero matrix elements. For example, if nzmax equals 100, the ir array contains 100 integers.

Each value in an ir array indicates a row (offset by 1) at which a nonzero element can be found. (The jc array is an index that indirectly specifies a column where nonzero elements can be found.)

For details on the ir and jc arrays, see mxSetIr and mxSetJc.


See the following examples in matlabroot/extern/examples/refbook.

See the following examples in matlabroot/extern/examples/mx.

See the following examples in matlabroot/extern/examples/mex.

See Also

mxGetJc, mxGetNzmax, mxSetIr, mxSetJc, mxSetNzmax, nzmax, nnz


与matlab mxgetir用法相关的文章

友情链接It题库(| 版权归yishouce.com所有| 友链等可联系|粤ICP备16001685号-1