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?

 Respuesta aceptada

Ameer Hamza
Ameer Hamza el 31 de Mayo de 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 comentarios

Walter Gazek
Walter Gazek el 31 de Mayo de 2020
Thank you!
Ameer Hamza
Ameer Hamza el 31 de Mayo de 2020
I am glad to be of help!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre MATLAB en Centro de ayuda y File Exchange.

Productos

Versión

R2018a

Preguntada:

el 31 de Mayo de 2020

Comentada:

el 31 de Mayo de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by