How to solve 6 nonlinear coupled equations with 6 unknowns by MATLAB?

5 次查看(过去 30 天)
Dear All, I would like to solve following equations by MATLAB. What would be the code?
x(2) +x(3) +x(5) +x(6) -6;
2*x(1) + 2*x(4) + 4*x(5) -12;
x(2) + 2*x(3) + x(4) - 6.5468;
1.280*x(4)*x(5)*(x(1)+x(2)+x(3)+x(4)+x(5)+1)-x(1)^3*x(2);
2.152*x(2)*x(4)-x(1)*x(3);
2.614*x(4)*(x(1)+x(2)+x(3)+x(4)+x(5)+1)-x(1)*x(2);

回答(1 个)

Torsten
Torsten 2015-2-25
help fsolve
Best wishes
Torsten.
  1 个评论
MJTHDSN
MJTHDSN 2018-4-12
Dear Matlabers,
I have a similar question. FSOLVE help didn`t really help me.
Let`s assume the equations as below:
SN = rnd(5,1); a = SN(1); b = SN(2); c = SN(3); d = SN(4); e = SN(5); f = SN(6);
eq1 = a*((x(1)^2)*(x(2)^2)+(x(1)^2)*(x(3)^2)-2*x(1)*(x(2)^2)+(x(2)^2))-((x(1)^2)*(x(4)^2)-2*x(1)*(x(4)^2)+(x(4)^2)-(2*x(1)*x(4)*x(5))+(x(4)*x(5))+(x(5)^2)) == 0;
eq2 = b*((x(1)^2)*(x(2)^2)+(x(1)^2)*(x(3)^2)-2*x(1)*(x(2)^2)+(x(2)^2))-((x(1)^2)*(x(4)^2)+(2*x(1)*x(4)*x(5))+(x(5)^2)) == 0;
eq3 = c*((x(1)^2)*(x(2)^2)+(x(1)^2)*(x(3)^2)-2*x(1)*(x(2)^2)+(x(2)^2))-((x(4)^2)+(2*x(4)*x(5))+(x(5)^2)) == 0;
eq4 = d*((x(1)^2)*(x(2)^2)+(x(1)^2)*(x(3)^2)-2*x(1)*(x(2)^2)+(x(2)^2))-((x(1)^2)*(x(4)^2)-2*x(1)*(x(4)^2)+ (x(4)^2)-(2*x(1)*x(4)*x(5))-(x(4)*x(5))+(x(5)^2)) == 0;
eq5 = e*((x(1)^2)*(x(2)^2)+(x(1)^2)*(x(3)^2)-2*x(1)*(x(2)^2)+(x(2)^2))-((x(1)^2)*(x(4)^2)-(2*x(1)*x(4)*x(5))+(x(5)^2)) == 0;
eq6 = f*((x(1)^2)*(x(2)^2)+(x(1)^2)*(x(3)^2)-2*x(1)*(x(2)^2)+(x(2)^2))-((x(4)^2)-(2*x(4)*x(5))+(x(5)^2)) == 0;
here, a,b,c,d,e,f are numbers (0.43 for example). For now I consider them as SN(i):
I want to find x(1),...,x(5) values.
I have tried many ways but no solution was found.
Can you help me with my problem?
Best

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Systems of Nonlinear Equations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by