I am trying to solve for a certain M that will satisfy 2 equations using the solve command. I know my final answer is supposed to be 1.2, and I have defined my equations. I am not sure if I am incorrectly using the solve command or have incorrectly defined the equations.
r = 1.4;
rm1 = r-1;
rp1 = r+1;
syms M
A_AS=sqrt((1/M^2)*(((2+rm1*M^2)/rp1)^(rp1/rm1)));
Po2_Po1=((rm1*.5*M^2)/(1+rm1*.5*M^2))^(r/rm1)*(1/(((2*r)/rp1)*M^2-(rm1/rp1)))^(1/rm1);
Ac_At = A_AS*Po2_Po1 == 1.2;
M = solve(Ac_At,M)
I would appreciate the help, thank you for your time

2 commentaires

MATLAB is finding one of the roots but not all of the roots.
For that those equations, are two real roots:
temp = roots([3630287, 15558480, -12224520, 3598560, -521640, 37584, -1080]);
temp(imag(temp)~=0) = [];
temp(temp<0) = [];
sol = sqrt(temp);
along with the negative of that. Approximately +/- 0.386916692037127
We do not know if your equations are right...
Jose Camorlinga Medina
Jose Camorlinga Medina le 15 Mar 2018
Modifié(e) : Walter Roberson le 15 Mar 2018
Thank you for your help.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by