External Interfaces/API Reference    
mxSetN

Set the number of columns

Fortran Syntax

Arguments

pm
   Pointer to an mxArray.

n
   The desired number of columns.

Description

Call mxSetN to set the number of columns in the specified mxArray. Call mxSetM to set the number of rows in the specified mxArray.

You typically use mxSetN to change the shape of an existing mxArray. Note that mxSetN does not allocate or deallocate any space for the pr, pi, ir, or jc arrays. Consequently, if your calls to mxSetN and mxSetM increase the number of elements in the mxArray, then you must enlarge the pr, pi, ir, and/or jc arrays.

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.

See Also

mxGetM, mxGetN, mxSetM


  mxSetM mxSetName (Obsolete)