| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |
boolean_T ssIsSpecialSampleHit(SimStruct *S, int_T sti1, int_T sti2, int_T tid)
SimStruct representing an S-Function block.
Index of the sample time.
Index of the sample time.
Task ID.
The Boolean value true if a sample hit has occurred at sti1 and a sample hit has also occurred at sti2 in the same time step. Otherwise, returns false.
Use this macro in mdlUpdate and mdlOutputs to ensure the validity of data shared by multiple tasks running at different rates. For more information, see Synchronizing Multirate S-Function Blocks.
C, C++
See the S-function matlabroot/toolbox/simulink/simdemos/simfeatures/src/mixedm.c used in sfcndemo_mixedm.mdl and the S-function matlabroot/toolbox/simulink/simdemos/simfeatures/src/sfun_multirate.c used in sfcndemo_sfun_multirate.mdl.
![]() | ssIsSampleHit | ssIsVariableStepSolver | ![]() |

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 |