MATLAB: Stateflow


Hi all, Here I am using "after(0.025, sec)" in statechart for generating pulse, but when it wached on scope,its generating at 0.03, why is the difference. Can any help me how to make exact at 0.025.

Best Answer

  • Hi Murali,
    using a sample time of 0.01s for your model lets you only generate pulses with a multiple of the basic sample time(0.01 / 0.02 / 0.03) If you want to generate a pulse of 0.025 you have to increase your sample time to e.g. 0.001s