文档

ssSetSampleTime

设置采样的时间段

语法

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

参数

年代

SimStruct表示一个S-Function块。

st_index

要设置时间段的采样时间索引。

指定的采样时间周期st_index

返回

time_T指定的采样时间值

描述

使用此宏mdlInitializeSizesmdlInitializeSampleTimes后调用ssSetNumSampleTimes以指定时间段的采样时间为其中st_index从0开始。看到设置采样次数和偏移量获取更多信息。使用ssSetOffsetTime如果采样时间有相关的偏移。

语言

C, c++

例子

下面的s函数使用了这个函数:

R2006a之前介绍