Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
mdlInitializeSampleTimes for S-Function blocks that can inherit sample time
#define MDL_INITIALIZE_SAMPLE_TIMES
static void mdlInitializeSampleTimes(SimStruct *S)
{
ssSetSampleTime(S, 0, INHERITED_SAMPLE_TIME);
ssSetOffsetTime(S, 0, 0.0);
ssSetModelReferenceSampleTimeInheritanceRule(S,
USE_DEFAULT_FOR_DISCRETE_INHERITANCE);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.