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

1 view (last 30 days)
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 Comments

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!