Main Content

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-1ifDYNAMICALLY_SIZED.

Description

Use inmdlInitializeSizesto 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.cused insfcndemo_sfun_zcand the S-functionsfun_zc_sat.cused insfcndemo_sfun_zc_sat.

See Also

ssSetNumModes

Version History

Introduced before R2006a