帮忙看看程序
下面是一个求多自由度有阻尼转子固有频率的程序,运行后总有这样的错误??? Strings passed to EVAL cannot contain function declarations.不知道是怎么回事啊,麻烦大家帮忙看看!谢谢了!m=
d=
k=
function =vbr_sf(m,d,k)
%vbr sf vbr sf(m,d,k)
% =vbr4(m,d,k)
% funtion vbr sf finds the mode shapes and natural frequencies of
% a linear second order matric equation.
% =vbr sf(m,f) finds the mode shapes amd 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) 估计是你把函数给写错了,把m\d\k这三个变量的赋值部分给放到函数文件里面去了,
还有你的这一行不对:if norm(d/m*k-k/m*d<1e-8*norm(k/m*d))自己去想想怎么改吧,应该很容易的
页:
[1]