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.

ssSetSampleTime

Set the period of a sample time

Syntax

time_T ssSetSampleTime(SimStruct *S, int_T st_index, time_T period)

Arguments

S

SimStruct representing an S-Function block.

st_index

Index of the sample time whose period is to be set.

period

Period of the sample time specified by st_index.

Returns

The time_T sample time value specified by period.

Description

Use this macro in mdlInitializeSizes or mdlInitializeSampleTimes to specify the period of the sample time where st_index starts at 0. See Setting Sample Times and Offsets for more information. Use ssSetOffsetTime if the sample time has an associated offset.

Languages

C, C++

Example

See the following S-functions for examples that use this function:

Introduced before R2006a

Was this topic helpful?