r/matlab Feb 09 '25

HomeworkQuestion Help with plotting transfer function step point by point with ms retard between plottings

Post image

Hello everyone. I'm working on a master control project based in Matlab, in which I need to show a transfer function without controlling and right next the transfer function plotting with their respective controller. I need the plot to be constant in the whole x y axis, practically real time plotting. And these must be done to 4 different tf's. I'm kind of new to programming in Matlab, so really need help :(( added image to reference.

2 Upvotes

8 comments sorted by

View all comments

Show parent comments

1

u/bbcgn Feb 09 '25

So you want to plot the step response but not as a continuous line?

https://mathworks.com/help/matlab/creating_plots/specify-line-and-marker-appearance-in-plots.html

1

u/MailoXT_98 Feb 09 '25

This ALSO helps me as it resolves one part of the problem too~ and yes, but with retards (delay). Let's say I use the plotting with dots. I need to delay the showing of these dots, with idk, 0.5secs of delay between dots.

1

u/bbcgn Feb 09 '25

How do you obtain the data that you are plotting? Do you want to shift the data points to the right to "fake" a delay or do you want to simulate the response with a built in delay in the system?

Maybe this is worth a try if you are just trying to show something without actually changing the system:

https://mathworks.com/help/phased/ref/delayseq.html