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
-
S
-
SimStruct representing an S-Function block.
-
nNonsampledZCs
-
Number of nonsampled zero crossings that a block detects.
Returns
The number of modes specified bynNonsampledZCs
, or-1
ifDYNAMICALLY_SIZED
.
Description
Use inmdlInitializeSizes
to specify the number of states for which the block detects nonsampled zero crossings (real_T
) as 0, a positive integer, orDYNAMICALLY_SIZED
. If you specifyDYNAMICALLY_SIZED
, you can specify the true (positive integer) width inmdlSetWorkWidths
; otherwise, the width used is the width of the signal passing through the block.
Languages
C, C++
Example
See the S-functionsfun_zc.c
used insfcndemo_sfun_zc
and the S-functionsfun_zc_sat.c
used insfcndemo_sfun_zc_sat
.