PLEASE HELP!!!! PLOT STEP FUNCTION WITH DEFINED AMPLITUDE
Show older comments
Hello everyone,
I have a problem with plotting step function. I have a code about plotting a transfer function. I will add my code to show.
In my code, i want to change the default amplitude of transfer function. As I learned, Matlab has a default amplitude as 1. According to my research, there is a option about "Options for the step command". Here is the link: https://www.mathworks.com/help/control/ref/stepdataoptions.html#d123e129499
Here, I want to change my amplitude as 5. I think I might write opt = stepDataOptions('StepAmplitude',5);
But here there was a code which is [y,t] = step(sys,opt); and I dont get it what is the meaning of y and t. Why must we do smth like that?
And also I want to plot my transfer function after change the amplitude. And again, as my research, I think I must be write code as plot(t,y).
But why must we write (t,y) in the plot while we define [y,t]?
K_parameter = 1;
TL_parameter = 2;
TI_parameter = 3;
WN_parameter = 4;
t_parameter = 5;
zeta_parameter = 6;
F = K_parameter*tf([TL_parameter 1],[TI_parameter 1])*tf(1,[1/WN_parameter^2 2*zeta_parameter/WN_parameter 1]);
sys = F*exp(-t_parameter*tf('s'));
transfer_plot = stepplot(sys);
grid on
info = stepinfo(sys)
st = info.SettlingTime
Accepted Answer
More Answers (0)
Categories
Find more on Control System Toolbox 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!
