How to solve 6 nonlinear coupled equations with 6 unknowns by MATLAB?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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);
0 Kommentare
Antworten (1)
Torsten
am 25 Feb. 2015
help fsolve
Best wishes
Torsten.
1 Kommentar
MJTHDSN
am 12 Apr. 2018
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
Siehe auch
Kategorien
Mehr zu Systems of Nonlinear Equations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!