필터 지우기
필터 지우기

Problem with the solve function

조회 수: 2 (최근 30일)
Alex Mannings
Alex Mannings 2013년 11월 18일
댓글: Alex Mannings 2013년 11월 18일
I am trying to solve this equation:
nux= ((gam+1)/(gam-1))^(1/2) * atan(((gam-1)/(gam+1))*(Mx^2-1))^(1/2)-atan(Mx^2-1)^(1/2);
for Mx, the rest of the variable are known (that is nux and gam).
My attempt to solve this question using the solve function (according to http://www.mathworks.com/help/symbolic/solve.html this link) didn't work, this is how i wrote it:
Mx=solve(nux-((gam+1)/(gam-1))^(1/2) * atan(((gam-1)/(gam+1))*(Mx^2-1))^(1/2)-atan(Mx^2-1)^(1/2)==0, Mx, "Real");
The error that i kept getting was:
"The input character is not valid in MATLAB statements or expressions."
Please let me know what i am doing wrong, and help me solve this equation.
Thank you.

답변 (1개)

Sai
Sai 2013년 11월 18일
Mx = solve(nux-((gam+1)/(gam-1))^(1/2) * atan(((gam-1)/(gam+1))*(Mx^2-1))^(1/2)-atan(Mx^2-1)^(1/2)==0, Mx, 'Real');
is this is what u are looking for???
  댓글 수: 1
Alex Mannings
Alex Mannings 2013년 11월 18일
Thanks, it should be 'Real', but now i get this error: " Cannot find an exact (case-sensitive) match for 'Mx'
The closest match is: mx in C:\Program Files\MATLAB\R2012a\toolbox\robust\rctobsolete\mutools\commands\mx.m
"

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by