Hi, I have the following response for a transfer function:
sys=tf[...];
impulse(sys);
but the problem is that I want to calculate the numerical derivative of the plot, I can't do the derivative of the tf. So I tried this:
dy=diff(impulse(sys))
plot(dy)
But this gave a graph that it's similar but it's wrong. I tried to take the discrete values of the plot too, but I didn't have good results. Someone know what can I do?

 채택된 답변

Ameer Hamza
Ameer Hamza 2020년 5월 31일

1 개 추천

See this example
sys = tf(1, [1 2 10]);
[y, t] = impulse(sys);
dy = gradient(y, t);
plot(t, y, 'r', t, dy, 'b')
legend({'y', 'dy/dt'})

댓글 수: 2

Walter Gazek
Walter Gazek 2020년 5월 31일
Thank you!
Ameer Hamza
Ameer Hamza 2020년 5월 31일
I am glad to be of help!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

제품

릴리스

R2018a

질문:

2020년 5월 31일

댓글:

2020년 5월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by