Matlab问题,错误Incomplete or misformed expression or statement.抓狂!function F= Eigenvalue_Equation(delt,M,Tg,amax)%求地震力F(前三阶振型下)% M is a mass matrix 质量矩阵% delt 柔度矩阵% V is a eigenvector特征向量矩阵%
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 06:53:21
Matlab问题,错误Incomplete or misformed expression or statement.抓狂!function F= Eigenvalue_Equation(delt,M,Tg,amax)%求地震力F(前三阶振型下)% M is a mass matrix 质量矩阵% delt 柔度矩阵% V is a eigenvector特征向量矩阵%
Matlab问题,错误Incomplete or misformed expression or statement.抓狂!
function F= Eigenvalue_Equation(delt,M,Tg,amax)
%求地震力F(前三阶振型下)
% M is a mass matrix 质量矩阵
% delt 柔度矩阵
% V is a eigenvector特征向量矩阵
% D is a eigenvalue特征值对角阵
%Tg 特征周期
%amax 水平地震影响系数最大值
ik=inv(delt);
[V,D]=eig(ik,M);
d=diag(sqrt(D));
for i=1:3
[d1(i),j]=min(d);
xgd(:,i)=V(:,j);
d(j)=max(d)+1;
end
w=d1; %所求自振频率
x=xgd; %所求结构主振型
for i=1:3
T(i)=0.7*2*pi/w(i);
end
for j=1:3
Mj=(x(:,j))'*M* x(:,j);
fi(:,j)=x(:,j)/sqrt(Mj); %振型的正交归一化
n=length(x(:,j));
I=ones(n,1);
zhcan(j)=(fi(:,j)*M*I/(( fi(:,j))'*M* fi(:,j)); (调试说此处有错!Incomplete or misformed expression or statement.) %求解振型参与系数
for i=1:3
if T(i)<=0.1
a(i)=0.45*amax+5.5*amax*T(i);
elseif(T(i)>0.1)&(T(i) <=Tg)
a(i)=amax;
elseif(T(i)>Tg)&(T(i) <=5*Tg)
l(i)=(Tg/T(i));
a(i)=l(i).^0.9*amax;
elseif(T(i)>5*Tg)&(T(i) <=6)
a(i)=[0.2.^0.9-0.02*(T(i)-5*Tg)*amax;
else
a(i)=NaN;
end
end
G=diag(9.8*M);
for j=1:3
for i=1:n
F(i,j)=a(j)*zhcan(j)*fi(i,j)*G(i);
end
end
Matlab问题,错误Incomplete or misformed expression or statement.抓狂!function F= Eigenvalue_Equation(delt,M,Tg,amax)%求地震力F(前三阶振型下)% M is a mass matrix 质量矩阵% delt 柔度矩阵% V is a eigenvector特征向量矩阵%
for j=1:3
Mj=(x(:,j))'*M* x(:,j);
fi(:,j)=x(:,j)/sqrt(Mj); %振型的正交归一化
n=length(x(:,j));
I=ones(n,1);
zhcan(j)=(fi(:,j)*M*I/(( fi(:,j))'*M* fi(:,j));
end % 少了,没发现吗