External Interfaces/API Reference |
Create an unpopulated N-dimensional character mxArray
Fortran Syntax
Arguments
ndim
The desired number of dimensions in the character mxArray
. You must specify a positive number. If you specify 0
, 1
, or 2
, mxCreateCharArray
creates a two-dimensional mxArray
.
dims
The dimensions array. Each element in the dimensions array contains the size of the array in that dimension. For example, setting dims(1)
to 5
and dims(2)
to 7
establishes a 5-by-7 character mxArray
. The dims
array must have at least ndim
elements.
Returns
A pointer to the created character mxArray
, if successful. If unsuccessful in a stand-alone (nonMEX-file) application, mxCreateCharArray
returns 0
. If unsuccessful in a MEX-file, the MEX-file terminates and control returns to the MATLAB prompt. Insufficient free heap space is the only reason for mxCreateCharArray
to be unsuccessful.
Description
Use mxCreateCharArray
to create an mxArray
of characters whose size is defined by ndim
and dims
. For example, to establish a two-dimensional mxArray
of characters having dimensions 12-by-3, set
The created mxArray
is unpopulated; that is, mxCreateCharArray
initializes each character to INTEGER*2 0
.
See Also
mxCreateCellMatrix | mxCreateCharMatrixFromStrings |