Having trouble to solve equations

1 visualizzazione (ultimi 30 giorni)
Debanita Das
Debanita Das il 19 Mag 2019
Commentato: Debanita Das il 21 Mag 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?

Risposta accettata

madhan ravi
madhan ravi il 19 Mag 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 Commenti
madhan ravi
madhan ravi il 20 Mag 2019
Try changing the initial guess.
Debanita Das
Debanita Das il 21 Mag 2019
Thank you Sir for your response
It worked. Thank you for your hep.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Programming in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by