2-D string array initialized to specified value
Pointer to the created mxArray, if successful. If unsuccessful in a standalone (non-MEX-file) application, returns NULL in C (0 in Fortran). If unsuccessful in a MEX-file, the MEX-file terminates and returns control to the MATLAB® prompt. The function is unsuccessful when there is not enough free heap space to create the mxArray. Another possible reason for failure is that str contains fewer than m strings.
Use mxCreateCharMatrixFromStrings to create a two-dimensional string mxArray, where each row is initialized to a string from str. In C, the created mxArray has dimensions m-by-max, where max is the length of the longest string in str. In Fortran, the created mxArray has dimensions m-by-n, where n is the number of characters in str(i).
String mxArrays represent their data elements as mxChar rather than as C char.
See the following examples in matlabroot/extern/examples/mx.