How to plot this model in MATLAB script
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have an output error model: y(t)=(0.006559z^-1 - 0.005439z^-2)/(1-1.893z^-1 + 0.8988z^-2) u(t) How would this be plotted using a MATLAB script? I assume it would involve using vectors to represent t and u, but am unsure how the equation would be represented.
0 Kommentare
Antworten (1)
Star Strider
am 14 Apr. 2017
You need to use the Control System Toolbox tf function (supply the correct sampling interval to get the correct plots):
% % H(z) = (0.006559z^-1 - 0.005439z^-2)/(1-1.893z^-1 + 0.8988z^-2)
Ts = -1; % Unknown Sampling Time Interval = ‘-1’
num = [0 0.006559 -0.005439];
den = [1 -1.893 0.8988];
sys = tf(num, den, Ts, 'Variable','z^-1'); % Create System Object
figure(1)
bode(sys)
This plots the Bode plot. You can plot others once you create the system object. You can also convert to other forms, such as state-space. See the documentation on the various functions for details.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Response Computation and Visualization 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!