Having trouble to solve equations

2 vues (au cours des 30 derniers jours)
Debanita Das
Debanita Das le 19 Mai 2019
Commenté : Debanita Das le 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?

Réponse acceptée

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

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by