<P>clc<br>clear<br>M=[2000 0 0 0 0 0 <br> 0 2000 0 0 0 0<br> 0 0 2000 0 0 0<br> 0 0 0 7056000 0 0<br> 0 0 0 0 2587000 0<br> 0 0 0 0 0 8428000];<br>K=[235200 0 0 0 0 0<br> 0 165800 0 0 0 -1028000<br> 0 0 58200 0 3609000 0<br> 0 0 0 370700000 0 0<br> 0 0 3609000 0 479900000 0<br> 0 -1028000 0 0 0 1405000000];</P>
<P>[ZX,W2]=eig(inv(M)*K);<br>W=sqrt(W2);<br>n0=size(inv(M)*K);<br>n=n0(2);</P>
<P>for i=1:n<br>p(i)=W(i,i);<br>ZX_max=max(ZX(:,i));<br>ZX(:,i)=ZX(:,i)/ZX_max;<br>end</P>
<P>for j=1:n-1<br> for i=1:n-j<br> if p(i)>p(i+1)<br> tmp=p(i);<br> p(i)=p(i+1);<br> p(i+1)=tmp;<br> ZX_tmp=ZX(:,i);<br> ZX(:,i)=ZX(:,i+1);<br> ZX(:,i+1)=ZX_tmp;<br> end<br> end<br>end</P>
<P>for i=1:n<br>subplot(6,1,i)<br>plot(ZX(:,i))<br>ylabel_1=['第' num2str(i) '阶主振型'];<br>ylabel(ylabel_1)<br>xlabel('x')<br>grid on<br>end<br></P>
[此贴子已经被作者于2006-6-6 18:48:04编辑过]
|