| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |
int_T ssSetNumNonsampledZCs(SimStruct *S, int_T nNonsampledZCs)
SimStruct representing an S-Function block.
Number of nonsampled zero crossings that a block detects.
The number of modes specified by nNonsampledZCs, or -1 if DYNAMICALLY_SIZED.
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.
C, C++
See the S-function matlabroot/toolbox/simulink/simdemos/simfeatures/src/sfun_zc.c used in sfcndemo_sfun_zc.mdl and the S-function matlabroot/toolbox/simulink/simdemos/simfeatures/src/sfun_zc_sat.c used in sfcndemo_sfun_zc_sat.mdl.
![]() | ssSetNumModes | ssSetNumOutputPorts | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |