External Interfaces Reference Previous page   Next Page
mxCreateString

Create 1-by-N character array initialized to specified string

Fortran Syntax

Arguments

str
   The string that is to serve as the mxArray's initial data.

Returns

A character array initialized to str if successful, and 0 otherwise.

Description

Use mxCreateString to create a character mxArray initialized to str. Many MATLAB functions (for example, strcmp and upper) require character mxArray inputs.

Free the character mxArray when you are finished using it. To free a character mxArray, call mxDestroyArray.

Example

See matdemo1.f in the eng_mat subdirectory of the examples directory for a sample program that illustrates how to use this routine in a Fortran program.


Previous page  mxCreateSparse mxCreateStructArray Next page

© 1994-2005 The MathWorks, Inc.