For simple test models, I commonly a syntax similar to:
// Assuming the start time is 0 and stop time is 1
x = xMin + (xMax - xMin) * time;
y = f(x);
To be correct no matter the simulation setup, I would like to use:
x = xMin + (xMax - xMin) * (time - startTime) / (stopTime - startTime);
y = f(x);
However, I am unsure how I can reference the values defined in the Simulation Setup / General form.
I have tried simply referencing StartTime, startTime, starttime, timestart, timeStart, etc. with no success.
I understand that it is possible to set StartTime and StopTime using an annotation, but those values are only set the first time a model is opened and so may not truly reflect a simulation's start time and stop time.