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

조회 수: 2 (최근 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 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