Solving an equation on MATLAB

1 回表示 (過去 30 日間)
Alex Mannings
Alex Mannings 2013 年 11 月 22 日
コメント済み: Alex Mannings 2013 年 12 月 19 日
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 件のコメント
Walter Roberson
Walter Roberson 2013 年 11 月 22 日
Interestingly, Maple 16 solve() generates a large number of false roots given specific nux and gam, such as nux=0 and gam=6/5

サインインしてコメントする。

採用された回答

Alan Weiss
Alan Weiss 2013 年 11 月 22 日
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
  1 件のコメント
Alex Mannings
Alex Mannings 2013 年 12 月 19 日
thanks .. it worked!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSolver Outputs and Iterative Display についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by