ssSetSampleTime
设置采样时间的周期
语法
time_T ssSetSampleTime(SimStruct *S, int_T st_index, time_T period)
参量
S
表示 S-Function 模块的 SimStruct。
st_index
要设置其周期的采样时间的索引。
period
由
st_index
指定的采样时间周期。
返回
由 period
指定的 time_T
采样时间值。
描述
在调用 ssSetNumSampleTimes
后,在 mdlInitializeSizes
或 mdlInitializeSampleTimes
中使用此宏来指定 st_index
从 0 开始的采样时间周期。有关详细信息,请参阅Setting Sample Times and Offsets。如果采样时间有相关联的偏移量,请使用 ssSetOffsetTime
。
语言
C、C++
示例
有关使用此函数的示例,请参考以下 S-Function:
在
sfcndemo_mixedmex
中使用的mixedmex.c
在
sfcndemo_dtype_io
中使用的sfun_dtype_io.c
在
sfcndemo_stvdtf
中使用的stvdtf.c
版本历史记录
在 R2006a 之前推出