Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

ssSetNumSampleTimes

Specify the number of sample times that an S-Function block has

Syntax

int_T ssSetNumSampleTimes(SimStruct *S, int_T nSampleTimes)

Arguments

S

SimStruct representing an S-Function block.

nSampleTimes

Number of sample times that S has.

Returns

The number of sample times specified by nSampleTimes, or -1 if PORT_BASED_SAMPLE_TIMES.

Description

Use in mdlInitializeSizes to set the number of sample times S has. Use a positive integer greater than 0 to set block-based sample times. Use PORT_BASED_SAMPLE_TIMES to set port-based sample times. See Sample Times for more information.

Languages

C, C++

Example

See the S-function mixedmex.c used in sfcndemo_mixedmex and the S-function sfun_port_constant.c used in sfcndemo_port_constant.

Introduced before R2006a

Was this topic helpful?