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 ビュー (過去 30 日間)
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)

回答 (1 件)

Birdman
Birdman 2018 年 5 月 22 日
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)

カテゴリ

Help Center および File ExchangeDigital Filter Analysis についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by