Why does matlab plot the unit step like a straight line?
显示 更早的评论
Hello, I want to pot only the unit step in matlab with this code:
s=tf('s')
sys=1/s
I expectet the step response like this:

But i get a plot in matlab like this:

Why do I get a step response like the second picture. Should a step input it not look like my first picture? Thanks
采纳的回答
更多回答(1 个)
Because that's what the step response of the transfer function you mentioned looks like.
You might be looking for heaviside
syms x
fplot(heaviside(x), [-5, 5],"LineWidth",1.5)
ylim([0 1.5])
类别
在 帮助中心 和 File Exchange 中查找有关 Tuning Goals 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



