External Interfaces Reference Previous page   Next Page
mxSetIr

Set ir array of sparse mxArray

Fortran Syntax

Arguments

pm
   Pointer to a sparse mxArray.

ir
   Pointer to the ir array. The ir array must be sorted in column-major order.

Description

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.

See Also

mxCreateSparse, mxGetIr, mxGetJc, mxSetJc


Previous page  mxSetImagData mxSetJc Next page

© 1994-2005 The MathWorks, Inc.