求大神指点画出振型图时的错误在哪??
function =vbr_sf(m,d,k)%vbr_sf vbr_sf(m,d,k)
% =vbr4(m,d,k)
% function vbr_sf finds the mode shapes and natural frequencies of
% a linear second order matrix equation.
% =vbr_sf(m,k) finds the mode shapes and natural frequencies
% for the undamped case.
if nargin==2
k=d;
=eig(m\k);
w=sqrt(w);
end
if nargin==3
if norm(d/m*k-k/m*d) < 1e-8*norm(k/m*d)
%disp('Damping is proportional, eigenvectors are real.')
=eig(m\k);
w=sqrt(w);
zeta=(v'*m*v)\(v'*d*v)/2/w;
else
%disp('Damping is non-proportional, eigenvectors are complex.')
a=;
=eig(a);
w=abs(w1);
zeta=-real(w1)/w;
end
end
w=diag(w);zeta=diag(zeta);
for i=1:4
subplot(4,1,i)
plot(zeta)
grid on
end
这是原M文件,运行:
m= ;
k= ;
d=;
vbr_sf(m,d,k);
可以得出ans =
0.7965 0.0427 -0.7211 0.1771
-0.1880 0.1811 0.1702 0.7503
-0.5593 -0.2257 -0.6537 0.1463
0.1320 -0.9563 0.1543 0.6199,
求大神指点一下画图,我画出来的图总是不理想,求指点错误所在。
个人水平/时间有限, 仅感觉LZ有些省话!?
页:
[1]