How to derive a response plot?

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?

 Accepted Answer

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

Thank you!
I am glad to be of help!

Sign in to comment.

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Products

Release

R2018a

Community Treasure Hunt

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

Start Hunting!