Hi! I'm using an m file to control a simulation (simulink slx file). The user enters the stop time. When the simulation time reaches its half value, (ie halfway through the simulation,) I need to change a constant from 0 to 1. when it reaches 75%, I need to change the (same) constant source from 1 to 0.
so my question is, how do we control the value of the constant block (or any other block that can produce a const, eg. a step block, or signal generator) with respect to the simulation time from an m file?
Please help me.. I googled a lot but couldn't find a solution thanks
Best Answer