请高手帮忙解决一个自由振动问题
自由振动方程为:M*X''+K*X=0,M阵和K阵都是对称矩阵,所以K阵在此仅写出上三角阵.u(t)从1到8,步长为1.请教高手如何用matlab画出u(t)变化时,频率的曲线.真诚请教!分,K为对称矩阵.具体K阵M阵见附件.
M*X''+K*X=0
V=;
M=diag(V);
K=[ 1e8+4*u(t)*1*10^8 0 0 0 0 0 0 0 0 -(1)*u(t)*1*10^8 (0)*u(t)*1*10^8 0 -(0)*u(t)*1*10^8 (1)*u(t)*1*10^8 0 -(-1)*u(t)*1*10^8 (0)*u(t)*1*10^8 0 -(0)*u(t)*1*10^8 (-1)*u(t)*1*10^8 0;
0 1e8+4*u(t)*1*10^8 0 0 0 0 0 0 0 -(0)*u(t)*1*10^8 -(1)*u(t)*1*10^8 0 -(1)*u(t)*1*10^8 -(0)*u(t)*1*10^8 0 -(0)*u(t)*1*10^8 -(-1)*u(t)*1*10^8 0 -(-1)*u(t)*1*10^8 -(0)*u(t)*1*10^8 0;
0 0 0+4*u(t)*1*10^8 0 0 0 0 0 0 0 -1*u(t)*1*10^8 0 0 -1*u(t)*1*10^8 0 0 -1*u(t)*1*10^8 0 0 -1*u(t)*1*10^8 0;
0 0 0 1e8 0 0 0 0 0 -0.374*0.374*5e8 0.374*0.9274*5e8 0.374*5e8 -0.9274*0.374*5e8 0.9274*0.9274*5e8 0.9274*5e8 -(-0.374)*0.374*5e8 (-0.374)*0.9274*5e8 (-0.374)*5e8 -(-0.9274)*0.374*5e8 (-0.9274)*0.9274*5e8 (-0.9274)*5e8;
0 0 0 0 1e8 0 0 0 0 0.9274*0.374*5e8 -0.9274*0.9274*5e8 -0.9274*5e8 (-0.374)*0.374*5e8 -(-0.374)*0.9274*5e8 -(-0.374)*5e8 (-0.9274)*0.374*5e8 -(-0.9274)*0.9274*5e8 -(-0.9274)*5e8 0.374*0.374*5e8 -0.374*0.9274*5e8 -0.374*5e8;
0 0 0 0 0 1e9+4*5e8 0 0 0 0.374*5e8 -0.9274*5e8 -1*5e8 0.374*5e8 -0.9274*5e8 -1*5e8 0.374*5e8 -0.9274*5e8 -1*5e8 0.374*5e8 -0.9274*5e8 -1*5e8;
0 0 0 0 0 0 1e8 0 0 (-0.374)*0.374*5e8 (-0.374)*0.9274*5e8 -(-0.374)*5e8 0.9274*0.374*5e8 0.9274*0.9274*5e8 -0.9274*5e8 0.374*0.374*5e8 0.374*0.9274*5e8 -0.374*5e8 (-0.9274)*0.374*5e8 (-0.9274)*0.9274*5e8 -(-0.9274)*5e8 ;
0 0 0 0 0 0 0 1e8 0 -0.9274*0.374*5e8 -0.9274*0.9274*5e8 0.9274*5e8 -0.374*0.374*5e8 -0.374*0.9274*5e8 0.374*5e8 -(-0.9274)*0.374*5e8 -(-0.9274)*0.9274*5e8 (-0.9274)*5e8 -(-0.374)*0.374*5e8 -(-0.374)*0.9274*5e8 (-0.374)*5e8;
0 0 0 0 0 0 0 0 0+4*5e8 -0.374*5e8 -0.9274*5e8 1*5e8 -0.374*5e8 -0.9274*5e8 1*5e8 -0.374*5e8 -0.9274*5e8 1*5e8 -0.374*5e8 -0.9274*5e8 1*5e8;
0 0 0 0 0 0 0 0 0 u(t)*1*10^8+5e8*0.1399+5e8*0.86 5e8*0.374*0.9274-5e8*0.374*0.9274 -5e8*0.374-5e8*0.374 0 0 0 0 0 0 0 0 0;
0 0 0 0 0 0 0 0 0 0 u(t)*1*10^8+5e8*0.86+5e8*0.1399 -5e8*0.9274+5e8*0.9274 0 0 0 0 0 0 0 0 0;
0 0 0 0 0 0 0 0 0 0 0 5e8+5e8 0 0 0 0 0 0 0 0 0 ;
0 0 0 0 0 0 0 0 0 0 0 0 u(t)*1*10^8+5e8*0.1399+5e8*0.86 5e8*0.374*0.9274-5e8*0.374*0.9274 -5e8*0.374-5e8*0.374 0 0 0 0 0 0;
0 0 0 0 0 0 0 0 0 0 0 0 0 u(t)*1*10^8+5e8*0.86+5e8*0.1399 -5e8*0.9274+5e8*0.9274 0 0 0 0 0 0;
0 0 0 0 0 0 0 0 0 0 0 0 0 0 5e8+5e8 0 0 0 0 0 0 ;
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 u(t)*1*10^8+5e8*0.1399+5e8*0.86 5e8*0.374*0.9274-5e8*0.374*0.9274 -5e8*0.374-5e8*0.374 0 0 0 ;
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 u(t)*1*10^8+5e8*0.86+5e8*0.1399 -5e8*0.9274+5e8*0.9274 0 0 0;
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5e8+5e8 0 0 0 ;
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 u(t)*1*10^8+5e8*0.1399+5e8*0.86 5e8*0.374*0.9274-5e8*0.374*0.9274 -5e8*0.374-5e8*0.374 ;
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 u(t)*1*10^8+5e8*0.86+5e8*0.1399 -5e8*0.9274+5e8*0.9274 ;
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5e8+5e8];
%K仅写出上三角部分,K为对称矩阵
[ 本帖最后由 sogooda 于 2008-6-27 09:37 编辑 ] 问题看不明白。
u(t)是啥?u和频率的关系曲线? 哥们儿,你这个问题用不着matlab高手,基本上自己找本书看看就解决了。自己运行一下看结果吧
V=;
M=diag(V);
u=1:8;
for i=1:8
K=[ 1e8+4*u(i)*1*10^8 0 0 0 0 0 0 0 0 -(1)*u(i)*1*10^8 (0)*u(i)*1*10^8 0 -(0)*u(i)*1*10^8 (1)*u(i)*1*10^8 0 -(-1)*u(i)*1*10^8 (0)*u(i)*1*10^8 0 -(0)*u(i)*1*10^8 (-1)*u(i)*1*10^8 0
0 1e8+4*u(i)*1*10^8 0 0 0 0 0 0 0 -(0)*u(i)*1*10^8 -(1)*u(i)*1*10^8 0 -(1)*u(i)*1*10^8 -(0)*u(i)*1*10^8 0 -(0)*u(i)*1*10^8 -(-1)*u(i)*1*10^8 0 -(-1)*u(i)*1*10^8 -(0)*u(i)*1*10^8 0
0 0 0+4*u(i)*1*10^8 0 0 0 0 0 0 0 -1*u(i)*1*10^8 0 0 -1*u(i)*1*10^8 0 0 -1*u(i)*1*10^8 0 0 -1*u(i)*1*10^8 0
0 0 0 1e8 0 0 0 0 0 -0.374*0.374*5e8 0.374*0.9274*5e8 0.374*5e8 -0.9274*0.374*5e8 0.9274*0.9274*5e8 0.9274*5e8 -(-0.374)*0.374*5e8 (-0.374)*0.9274*5e8 (-0.374)*5e8 -(-0.9274)*0.374*5e8 (-0.9274)*0.9274*5e8 (-0.9274)*5e8
0 0 0 0 1e8 0 0 0 0 0.9274*0.374*5e8 -0.9274*0.9274*5e8 -0.9274*5e8 (-0.374)*0.374*5e8 -(-0.374)*0.9274*5e8 -(-0.374)*5e8 (-0.9274)*0.374*5e8 -(-0.9274)*0.9274*5e8 -(-0.9274)*5e8 0.374*0.374*5e8 -0.374*0.9274*5e8 -0.374*5e8
0 0 0 0 0 1e9+4*5e8 0 0 0 0.374*5e8 -0.9274*5e8 -1*5e8 0.374*5e8 -0.9274*5e8 -1*5e8 0.374*5e8 -0.9274*5e8 -1*5e8 0.374*5e8 -0.9274*5e8 -1*5e8
0 0 0 0 0 0 1e8 0 0 (-0.374)*0.374*5e8 (-0.374)*0.9274*5e8 -(-0.374)*5e8 0.9274*0.374*5e8 0.9274*0.9274*5e8 -0.9274*5e8 0.374*0.374*5e8 0.374*0.9274*5e8 -0.374*5e8 (-0.9274)*0.374*5e8 (-0.9274)*0.9274*5e8 -(-0.9274)*5e8
0 0 0 0 0 0 0 1e8 0 -0.9274*0.374*5e8 -0.9274*0.9274*5e8 0.9274*5e8 -0.374*0.374*5e8 -0.374*0.9274*5e8 0.374*5e8 -(-0.9274)*0.374*5e8 -(-0.9274)*0.9274*5e8 (-0.9274)*5e8 -(-0.374)*0.374*5e8 -(-0.374)*0.9274*5e8 (-0.374)*5e8
0 0 0 0 0 0 0 0 0+4*5e8 -0.374*5e8 -0.9274*5e8 1*5e8 -0.374*5e8 -0.9274*5e8 1*5e8 -0.374*5e8 -0.9274*5e8 1*5e8 -0.374*5e8 -0.9274*5e8 1*5e8
0 0 0 0 0 0 0 0 0 u(i)*1*10^8+5e8*0.1399+5e8*0.86 5e8*0.374*0.9274-5e8*0.374*0.9274 -5e8*0.374-5e8*0.374 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 u(i)*1*10^8+5e8*0.86+5e8*0.1399 -5e8*0.9274+5e8*0.9274 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 5e8+5e8 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 u(i)*1*10^8+5e8*0.1399+5e8*0.86 5e8*0.374*0.9274-5e8*0.374*0.9274 -5e8*0.374-5e8*0.374 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 u(i)*1*10^8+5e8*0.86+5e8*0.1399 -5e8*0.9274+5e8*0.9274 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 5e8+5e8 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 u(i)*1*10^8+5e8*0.1399+5e8*0.86 5e8*0.374*0.9274-5e8*0.374*0.9274 -5e8*0.374-5e8*0.374 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 u(i)*1*10^8+5e8*0.86+5e8*0.1399 -5e8*0.9274+5e8*0.9274 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5e8+5e8 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 u(i)*1*10^8+5e8*0.1399+5e8*0.86 5e8*0.374*0.9274-5e8*0.374*0.9274 -5e8*0.374-5e8*0.374
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 u(i)*1*10^8+5e8*0.86+5e8*0.1399 -5e8*0.9274+5e8*0.9274
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5e8+5e8];
%K仅写出上三角部分,K为对称矩阵
K=(K+K.')/2;
=eig(K,M);
w(i,:)=sqrt(diag(d));
end
for i=1:8
figure; plot(abs(w(:,i)))
end 非常感谢您的解答,u(t)的变化范围是从1到8,所以当u(t)变化时,它后面乘以了1*10^8, 在矩阵中整个项" u(t)*1*10^8"是刚度项,所以刚度项也发生了变化啊,u(t)每取一个步长值,刚度也有个对应值,解出每个刚度值对应的矩阵的特征值就可以得到21阶频率,我就想把每阶频率的变化绘制曲线,最近刚j接触了matlab,觉得用这个工具解特征值很方便,但水平太低,清您不吝指教啊! 把最后一点儿改成
for i=1:21
figure; plot(abs(w(:,i)))
end
页:
[1]