| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |
time_T ssGetSampleTime(SimStruct *S, int_T sti);
A time_T value indicating the sample time associated with the index sti.
Use to obtain the sample time of S corresponding to the sample time index sti. See matlabroot/extern/include/tmwtypes.h for a description of the time_T data type.
Note You cannot call this macro in S-functions that only use port-based sample times. You should use the macros ssGetInputPortSampleTime and ssGetOutputPortSampleTime. |
C, C++
The following statement
time_T t = ssGetSampleTime(S, 0);
returns the S-function's current sample time.
See the S-function matlabroot/toolbox/simulink/simdemos/simfeatures/src/sfun_zc_sat.c used in sfcndemo_sfun_zc_sat.mdl for a complete example that uses this function.
![]() | ssGetRWorkValue | ssGetSFcnParam | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |