User`s guide
The C MEX S-Function SimStruct
3-99
ssSetOptions
(S,options)
Used in mdlInitializeSizes t o set any of the following options.
These options must be joined using the OR operator. For example:
ssSetOption(S, (SS_OPTION_EXCEPTION_FREE_CODE |
SS_OPTION_DISCRETE_VALUED_OUTPUT));
SS_OPTION_EXCEPTION_FREE_CODE
— If your S-function does not
use
mexErrMsgTxt, mxCalloc, or a ny other routines that can throw
an exception when called, you can set this option for improved
performance.
SS_OPTION_DISCRETE_VALUED_OUTPUT — Specify this if your
S-function has discrete valued outputs. This is checked when your
S-function is placed within an algebraic loop. If your S-function has
discrete valued outputs, then its outputs will not be assigned
algebraic variables.
SS_OPTION_PLACE_ASAP — Used to specify that your S-function
should be placed as soon as possible. This is typically used by
devices connecting to hardware.
SS_OPTION_ALLOW_INPUT_SCALAR_EXPANSION — Used t o specify
that the input to your S-function input ports can be either 1 or the
size specified by the port, which is usually referred t o as the block
width.
Table 3-5: General SimStruct Macros (Continued)
Macro Description