Regarding Loops and Control theory .
Mostra commenti meno recenti
syms s
% Define the values of omega and zeta respectively
omega = [2 2 1 1];
zeta = [0 0.1 0 0.2];
t = 0:0.2:16;
for n = 1: size(zeta)
for m = 1: size(omega)
% Formula
num = tf( [0 0 omega(m)^2] );
den = tf( [ 1 2*omega(m)*zeta(n)*s omega(m)^2] );
% Impulse response of the system
y = impulse(num,den,t);
end
end
plot(t,y)
% The error that i am getting is
% Error using tf (line 299) In the "tf(M)" command, M must be a numeric array.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Loops and Conditional Statements in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!