| C Math Library Reference | ![]() |
Create vectors and use in array subscripting
C Prototype
mxArray *mlfColon(mxArray *start, mxArray *step, mxArray *end);
Arguments
mxArray *start
Initial value.
NULL if only start and end values are passed.
Description
This function lets you specify a vector index.
Example
This example specifies the vector [ 1 2 3 4 5 6 7 8 9 10 ].
mxArray *vector_index = NULL;mlfAssign(&vector_index,mlfColon(mlfScalar(1), mlfScalar(10), NULL));
This example is equivalent to a call to mlfCreateColonIndex().
mxArray *colon = NULL; mlfAssign(&colon, mlfColon(NULL,NULL,NULL));
See Also
mlfIndexAssign, mlfIndexDelete, mlfIndexRef, mlfCreateColonIndex, mlfEnd
| mlfAssign | mlfComplexScalar | ![]() |