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

6 ビュー (過去 30 日間)
Madhulima Bhandari
Madhulima Bhandari 2015 年 2 月 24 日
コメント済み: MJTHDSN 2018 年 4 月 12 日
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 Center および File ExchangeMathematics and Optimization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by