如何用matlab求解方程组:
发布网友
发布时间:2022-06-05 06:26
我来回答
共1个回答
热心网友
时间:2022-07-09 11:28
各个求解的值如下(顺序按f1 f2 f3 a1 a2 a3 l 来排列):
21778.7871329802
12000.9356630316
-11922.6944325793
-86.4103285726901
-55.0078735996165
-76.9992191199574
1.00058665833736
我的程序:
clc;clear
FFF=@(x) [x(1)*sin(x(4))+9800-x(7)*pi*1025*9.8;
x(2)*sin(x(5))+9800-(x(1)*sin(x(4))+pi*0.025^2*1025*9.8);
x(3)*sin(x(6))+98-(x(2)*sin(x(5))+pi*0.025^2*1025*9.8);
sin(x(4))+sin(x(5))+x(7)-3;
x(1)*cos(x(4))-360;
x(2)*cos(x(5))-360;
x(3)*cos(x(6))-360];
flag=0;
imax=100;i=0;
while(flag~=1)
[x,fval,flag]=fsolve(FFF,100*(rand(7,1)-1));
i=i+1;
if(i>=imax)
clc;fprintf('不能求解!!\n')
break;
end
end
想能够帮到你