MATLAB Application Program Interface | Search  Help Desk |
mxSetIr | See Also |
Set the ir
array of a sparse mxArray
subroutine mxSetIr(pm, ir) integer*4 pm,irpm
mxArray
.
ir
ir
array. The ir
array must be sorted in column-major order.
Use mxSetIr
to specify the ir
array of a sparse mxArray
. The ir
array is an array of integers; the length of the ir
array should equal the value of nzmax
.
Each element in the 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. See mxSetJc
for more details on jc
.)
The ir
array must be in column-major order. That means that the ir
array must define the row positions in column 1 (if any) first, then the row positions in column 2 (if any) second, and so on through column N. Within each column, row position 1 must appear prior to row position 2, and so on.
mxSetIr
does not sort the ir
array for you; you must specify an ir
array that is already sorted.
mxCreateSparse
, mxGetIr
, mxGetJc
, mxSetJc