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

Create a character array from an mxArray

Fortran Syntax

Arguments

pm
  Pointer to an mxArray.

str
  Fortran character array.

strlen
  Number of characters to retrieve from the mxArray.

Returns

The character array, on success. Returns 0 otherwise.

Description

Call mxGetString to copy a character array from an mxArray. mxGetString copies and converts the character array from the mxArray pm into the character array str. Storage space for character array str must be allocated previously.

Only up to strlen characters are copied, so ordinarily, strlen is set to the dimension of the character array to prevent writing past the end of the array. Check the length of the character array in advance using mxGetM and mxGetN. If the character array contains several rows, they are copied, one column at a time, into one long character array.

See Also

mxCalloc



[ Previous | Help Desk | Next ]