matlab求方程组问题
L1=304.8;L2=101.6;L3=254.0;L4=177.8;
th2=[0:1/36:2]*pi;
options=optimset('display','off');
form=1:length(th2)
th34(m,:)=fsolve('fourbarposition',[11],options,th2(m),L2,L3,L4,L1);
end
w2=250;
fori=1:length(th2)
A=[-L3*sin(th34(i,1))L4*sin(th34(i,2));L3*cos(th34(i:1))-L4*cos(th34(i,2))];
B=[w2*L2*sin(th2(i));-w2*L2*cos(th2(i))];
w=inv(A)*B;
w3(i)=w(1);
w4(i)=w(2);
end
plot(th2*180/pi,w3,th2*180/pi,w4);
就刚才哪错误,感激不尽!
Errorusing==>vertcat
Allrowsinthebracketedexpressionmusthavethesame
numberofcolumns.
Errorin==>D:MATLAB6p5shiyan.m
Online9==>A=[-L3*sin(th34(i,1))L4*sin(th34(i,2));L3*cos(th34(i:1))-L4*cos(th34(i,2))];