ssSetNumNonsampledZCs
Specify the number of states for which a block detects zero crossings that occur between sample points
Syntax
int_T ssSetNumNonsampledZCs(SimStruct *S, int_T nNonsampledZCs)
Arguments
SSimStruct that represents an S-Function block.
nNonsampledZCsNumber of nonsampled zero crossings that a block detects.
Returns
The number of modes specified by nNonsampledZCs, or
-1 if DYNAMICALLY_SIZED.
Description
Use in mdlInitializeSizes to specify the number of states for
which the block detects nonsampled zero crossings (real_T) as 0,
a positive integer, or DYNAMICALLY_SIZED. If you specify
DYNAMICALLY_SIZED, you can specify the true (positive
integer) width in mdlSetWorkWidths; otherwise, the width used is
the width of the signal passing through the block.
Languages
C, C++
Examples
See the S-function sfun_zc.c used in sfcndemo_sfun_zc and the S-function sfun_zc_sat.c used in sfcndemo_sfun_zc_sat.
See Also
Version History
Introduced before R2006a