Writing S-Functions | ![]() ![]() |
Get the data type of an S-function parameter.
Syntax
Arguments
m
MATLAB array representing the parameter.
Description
Returns the data type of an S-function parameter represented by a MATLAB array. This macro returns an enumerated type representing the data type. The enumerated type DTypeId
is defined in simstruc.h
. The following table shows the equivalency of Simulink, MATLAB, and C data types.
ssGetDTypeIdFromMxArray
returns INVALID_DTYPE_ID
if the mxClassId
does not map to any built-in Simulink data type ID. For example, if mxId == mxSTRUCT_CLASS
, the return value is INVALID_DTYPE_ID
. Otherwise the return value is one of the enum
values in BuiltInDTypeId
. For example, if mxId == mxUINT16_CLASS
, the return value is SS_UINT16
.
Example
See the example in matlabroot/simulink/src/sfun_dtype_param.c
to learn how to use data typed parameters in an S-function.
Languages
See Also
![]() | ssGetDiscStates | ssGetDWork | ![]() |