Borrar filtros
Borrar filtros

Solving an equation on MATLAB

2 visualizaciones (últimos 30 días)
Alex Mannings
Alex Mannings el 22 de Nov. de 2013
Comentada: Alex Mannings el 19 de Dic. de 2013
Hi Everyone,
How can i solve this equation for Mx in MATLAB. Mx has to be a real root. (nux and gam are known)
nux= ((gam+1)/(gam-1))^(1/2) * atan(((gam-1)/(gam+1))*(Mx^2-1))^(1/2)-atan(Mx^2-1)^(1/2);
I really need to solve this since the rest of the code depends on the solution of this equation.
Thank you.
  1 comentario
Walter Roberson
Walter Roberson el 22 de Nov. de 2013
Interestingly, Maple 16 solve() generates a large number of false roots given specific nux and gam, such as nux=0 and gam=6/5

Iniciar sesión para comentar.

Respuesta aceptada

Alan Weiss
Alan Weiss el 22 de Nov. de 2013
Try fzero. I suggest that you give an initial interval such as [1,1000] because you will get an error if fzero tries a value less than 1 (the square root of a negative number is complex, and fzero deals with real numbers only.
Alan Weiss
MATLAB mathematical toolbox documentation

Más respuestas (0)

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by