In Simulink, I want to display the value of x from 0 to 5 sec with a time interval of 0.05 sec, is the above code logic inside MATLAB fcn block correct ? If, no then suggest ?

1 view (last 30 days)
for t = 0:0.0001:5
display (x);
for i = 1:1:99
if (t == (0.05 * i))
pause(0.00001);
else
continue;
end
end
end
Here, 0 to 5 sec is the simulation running time.

Answers (0)

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!