MATLAB Application Program Interface
  Go to function:
    Search    Help Desk 
mxCreateCharArray    Examples   See Also

Create an unpopulated N-dimensional string mxArray

C Syntax

Arguments

ndim
  The desired number of dimensions in the string 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[0] to 5 and dims[1] to 7 establishes a 5-by-7 mxArray. The dims array must have at least ndim elements.

Returns

A pointer to the created string mxArray, if successful. If unsuccessful in a stand-alone (nonMEX-file) application, mxCreateCharArray returns NULL. 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

Call mxCreateCharArray to create an unpopulated N-dimensional string mxArray.

Examples

Call mxCreateCharArray to create a 3-by-80-by-2 string mxArray. Then, populate the string mxArray based on the values in Shake and Twain.

For an additional example, see mxcreatechararray.c in the mx subdirectory of the examples directory.

See Also

mxCreateCharMatrixFromStrings, mxCreateString



[ Previous | Help Desk | Next ]