When simulating the response to a specific input signal, the input data U must be a matrix with as many rows as samples in the time vector T, and as many columns as input channels.
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
e=0.09119
wn=69.79
num=wn*wn
den=[1 2*e*wn wn*wn];
g=tf(num,den);
t=0:0.05:5
u=zeros(size(t)-1);
u=[1,u];
y=lsim(num,den,u,t);
plot(t,y)
0 commentaires
Réponses (1)
Birdman
le 22 Mai 2018
Try the following code. By the way, I did not understand why you gave zeros as input, therefore I changed it with ones vector:
e=0.09119;
wn=69.79;
num=wn*wn;
den=[1 2*e*wn wn*wn];
g=tf(num,den);
t=[0:0.05:5].';t=t(1:100);
u=ones(max(size(t)),1);
y=lsim(num,den,u,t);
plot(t,y)
0 commentaires
Voir également
Catégories
En savoir plus sur Digital Filter Analysis dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!