Using the C Math Library    

Indexing Functions

An array subscript consists of one or more indices passed as mxArray * arguments to one of the indexing functions. For example, the two-dimensional indexing expression

applies the subscript (3,1) to A and returns the element at row three, column one.  mlfIndexRef(A, "(?)", mlfScalar(9)), a one-dimensional indexing expression, returns the ninth element of array A.

Both standard indexing and cell array indexing take numeric arguments, one argument for each dimension of the array being indexed into. Structure indexing uses only the name of the structure field.

The indexing functions in the MATLAB C Math Library support N-dimensional standard, cell array, and structure indexing.

An index mxArray argument can contain a scalar, vector, matrix, or the result from a call to the special function mlfCreateColonIndex().

You can also use the mlfColon() function, which is patterned after the MATLAB colon operator, to specify a vector subscript. For example, mlfColon(mlfSclar(1), mlfScalar(10), NULL) specifies the vector
[ 1 2 3 4 5 6 7 8 9 10 ].


 Terminology Array Storage