I'm using solve to find the solutions to an equation that will have two solutions but I can only see one.

1 visualización (últimos 30 días)
I need to see both solutions for an equation, the equation is used to find mach number but it throws out the supersonic solutions which I need.
for i=1:length(Aratio)
syms m
ratio = Aratio(i);
sol = solve(ratio == ((gamma+1)/2)^(-(gamma+1)/(2*(gamma-1)))*...
((1+(gamma-1)/2*m^2)^((gamma+1)/(2*(gamma-1))))/m, m);
sol = double(sol);
M(i) = sol(1);
end
  4 comentarios

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by