How to derive a response plot?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Walter Gazek
am 31 Mai 2020
Kommentiert: Ameer Hamza
am 31 Mai 2020
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 Kommentare
Akzeptierte Antwort
Ameer Hamza
am 31 Mai 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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!