Why does matlab plot the unit step like a straight line?
조회 수: 17 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
Sam Chak
2022년 11월 8일
Hi @Mark S
System 1:
s = tf('s');
sys1 = 1/s; % integrator system
step(sys1)
System 2:
sys2 = zpk([], [], 1) % just a static gain
step(sys2)
댓글 수: 0
추가 답변 (1개)
Dyuman Joshi
2022년 11월 8일
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])
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Stability Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!