How to derive a response plot?
6 views (last 30 days)
Show older comments
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?
0 Comments
Accepted Answer
Ameer Hamza
on 31 May 2020
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 Comments
More Answers (0)
See Also
Categories
Find more on 2-D and 3-D Plots 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!