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)
Mostrar comentarios más antiguos
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
Respuestas (0)
Ver también
Categorías
Más información sobre Linear Algebra en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!