Main Content

Define Missing MLTYPE Parameter

MATLAB® automatically converts C++ types to MATLAB types, as described in C++ to MATLAB Data Type Mapping.

If the C++ type for the argument is a string, then use these options to choose values for the MLTYPE and SHAPE arguments in defineArgument statements.

C++ TypeMATLABTypeDIRECTIONOptions for SHAPE
char*a

"int8"

"input"

Scalar value
Array of scalar values

char**
char*[]

"string"

"input"

cell

const char*

"char"

 

Scalar value
Array of scalar values

"string"

"input"

"nullTerminated"

const char**
const char*[]

"char"

"input"

Scalar value
Array of scalar values

"string"

"input"

"nullTerminated"

a These types are equivalent to MATLAB char:

  • wchar_t

  • char16_t

  • char32_t

Related Topics