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)
Show older comments
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.
0 Comments
Answers (0)
See Also
Categories
Find more on Sources in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!