User`s guide
Noninlined S-Functions
4-7
Noninlined S-Functions
Noninlined S-functions are identified by the absence of an sfunction.tlc file
foryourS-function(
sfunction.mex). When pla cing a noninlined S-function in
a model that is to be used with the Real-Time Workshop, the following
MATLAB API functions are supported:
•
mxGetEps
• mxGetInf
• mxGetM
• mxGetN
• mxGetNaN
• mxGetPr — Note: using mxGetPr on a n empty matrix does not return NULL;
rather, it returns a random value. T herefore, you should protect calls to
mxGetPr with mxIsEmpty.
•
mxGetScalar
• mxGetString
• mxIsEmpty
• mxIsFinite
• mxIsInf
In addition, parameters to S-functions can only b e of type double precision or
characters contained in scalars, vectors, or 2-D matrices. To obtain more
flexibility in the type of parameters you can supply to S-functions or the
operations in the S-function, you need to inline your S-function and (possibly)
use a
mdlRTW S-function routine.