Clear Filters
Clear Filters

How to draw the response to a negative step command in matlab?

9 views (last 30 days)
Hi everyone, I am doing a MSc project and I need to draw the response of a transfer function to a negative step input. Can you please elaborate how can I do this? and Also how can I change the time step in order to achieve a smooth time response?
Thanks in advance
P.s. The transfer function code is as follow:
sys=tf([0.421 -0.6734 -23.46 -71.02 -229 -359.5 -2.766 0.034 0.0002239 -6.719e-16],[1 24.5 102.2 344.8 765.8 915.2 685.6 19.19 4.86 0.05328 -3.802e-15])

Answers (1)

Star Strider
Star Strider on 26 Dec 2016
Use the StepDataOptions function to set the options for the step function. You need to set the amplitude to -1.
The Code:
sys=tf([0.421 -0.6734 -23.46 -71.02 -229 -359.5 -2.766 0.034 0.0002239 -6.719e-16],[1 24.5 102.2 344.8 765.8 915.2 685.6 19.19 4.86 0.05328 -3.802e-15])
opt = stepDataOptions('StepAmplitude',-1);
[y,t] = step(sys,opt);
figure(1)
plot(t, y)

Community Treasure Hunt

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

Start Hunting!