Set the period of a sample time
time_T ssSetSampleTime(SimStruct *S, int_T st_index, time_T period)
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.
See the following S-functions for examples that use this function: