필터 지우기
필터 지우기

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 CenterFile Exchange에서 Solver 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