External Interfaces Reference |
C Syntax
Arguments
array_ptr
Pointer to an mxArray
.
Description
Call mxSetM
to set 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 mxArray
. Note that mxSetM
does not allocate or deallocate any space for the pr
, pi
, ir
, or jc
arrays. Consequently, if your calls to mxSetM
and mxSetN
increase the number of elements in the mxArray
, then you must enlarge the pr
, pi
, ir
, and/or jc
arrays. Call mxRealloc
to enlarge them.
If your calls to mxSetM
and mxSetN
end up reducing the number of elements in the mxArray
, then you may want to reduce the sizes of the pr
, pi
, ir
, and/or jc
arrays in order to use heap space more efficiently. However, reducing the size is not mandatory.
Examples
See mxsetdimensions.c
in the mx
subdirectory of the examples
directory. For an additional example, see sincall.c
in the refbook
subdirectory of the examples
directory.
See Also
mxSetLogical (Obsolete) | mxSetN |
© 1994-2005 The MathWorks, Inc.