Set number of rows in mxArray
#include "fintrf.h" subroutine mxSetM(pm, m) mwPointer pm mwSize m
mxSetM sets the number of rows in the specified
mxArray. The term rows means the first
dimension of an
mxArray, regardless of the number of dimensions. Call
mxSetN to set the number of columns.
You typically use
mxSetM to change the shape of an existing
mxSetM function does not
allocate or deallocate any space for the
jc arrays. So, if your calls to
mxSetN increase the number of
elements in the
mxArray, then enlarge the
mxRealloc to enlarge them.
mxSetN reduces the
number of elements in the
mxArray, then you might want to reduce the
sizes of the
jc arrays to use heap space more efficiently. However, reducing
the size is not mandatory.
See these examples in
Introduced before R2006a