shouce 发表于 2018-4-16 19:41:12

无阻尼二自由系统固有频率的程序

% 无阻尼二自由系统固有频率的程序 20180401A
m1=100;m2=100;k1=200;k2=400;%
c1=0;c2=0;
x0=;xd0=;tf=50;dt=0.1;
M=;k=;
c=;
A=;
y0=;
for i=1:round(tf/dt)+1
    t(i)=dt*(i-1)
    y(:,i)=expm(A*t(i))*y0;
end
subplot(2,1,1),plot(t,y(1,:)),grid
subplot(2,1,2),plot(t,y(2,:)),grid
=eig(A)




lamda =
Columns 1 through 2
0.000000000000000 + 3.020447918044219i0.000000000000000 + 0.000000000000000i
0.000000000000000 + 0.000000000000000i0.000000000000000 - 3.020447918044219i
0.000000000000000 + 0.000000000000000i0.000000000000000 + 0.000000000000000i
0.000000000000000 + 0.000000000000000i0.000000000000000 + 0.000000000000000i
Columns 3 through 4
0.000000000000000 + 0.000000000000000i0.000000000000000 + 0.000000000000000i
0.000000000000000 + 0.000000000000000i0.000000000000000 + 0.000000000000000i
-0.000000000000000 + 0.936426384924271i0.000000000000000 + 0.000000000000000i
0.000000000000000 + 0.000000000000000i -0.000000000000000 - 0.936426384924271i




鸿鹄重工 发表于 2019-4-26 09:38:08

代码中有个笑脸是啥意思,此处应该是什么代码?
页: [1]
查看完整版本: 无阻尼二自由系统固有频率的程序