Having trouble to solve equations

2 Ansichten (letzte 30 Tage)
Debanita Das
Debanita Das am 19 Mai 2019
Kommentiert: Debanita Das am 21 Mai 2019
E=1.42;
x=sym('x%d',[1,3]);
a=((E+x(1))*0.1+(-x(2)-7*x(3))*(((E+x(1))*(E+x(1))*(E+x(1))*(E+x(1)))/(((E+x(1))*(E+x(1))*(E+x(1))*(E+x(1)))+1)))*(1-x(1))-0.1*x(1);
b=((1+x(2))*0.1+x(1)*(((1+x(2))*(1+x(2))*(1+x(2))*(1+x(2)))/(((1+x(2))*(1+x(2))*(1+x(2))*(1+x(2)))+1)))*(1-x(2))-0.1*x(2);
c=((1+x(3))*0.1+23*x(1)*(((1+x(3))*(1+x(3))*(1+x(3))*(1+x(3)))/(((1+x(3))*(1+x(3))*(1+x(3))*(1+x(3)))+1)))*(1-x(3))-0.1*x(3);
[solutions_x1, solutions_x2, solutins_x3] = solve(a == 0, b == 0, c == 0, x(1), x(2), x(3))
This is the code that I am trying to run in order to find the respective solutions but MATLAB is taking forever to give an answer. May I know how to find the solutions in MATLAB? Can anyone help me out?

Akzeptierte Antwort

madhan ravi
madhan ravi am 19 Mai 2019
E=1.42;
F=@(x)[((E+x(1))*0.1+(-x(2)-7*x(3))*(((E+x(1))*(E+x(1))*(E+x(1))*(E+x(1)))/(((E+x(1))*(E+x(1))*(E+x(1))*(E+x(1)))+1)))*(1-x(1))-0.1*x(1);
((1+x(2))*0.1+x(1)*(((1+x(2))*(1+x(2))*(1+x(2))*(1+x(2)))/(((1+x(2))*(1+x(2))*(1+x(2))*(1+x(2)))+1)))*(1-x(2))-0.1*x(2);
((1+x(3))*0.1+23*x(1)*(((1+x(3))*(1+x(3))*(1+x(3))*(1+x(3)))/(((1+x(3))*(1+x(3))*(1+x(3))*(1+x(3)))+1)))*(1-x(3))-0.1*x(3)];
x=fsolve(F,[0;0;0])
  3 Kommentare
madhan ravi
madhan ravi am 20 Mai 2019
Try changing the initial guess.
Debanita Das
Debanita Das am 21 Mai 2019
Thank you Sir for your response
It worked. Thank you for your hep.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by