![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/979880/image.png)
How can I calculate the value in an equation?
조회 수: 2 (최근 30일)
이전 댓글 표시
gamma=1.4
V_M_2 = 20;
V_M_2 = sqrt((gamma+1)/(gamma-1)) * atan(sqrt((gamma-1)/(gamma+1)*(M_2^2-1)))-atan(sqrt(M_2^2-1))
How can I find the M_2 from this equation? Thank you.
댓글 수: 0
채택된 답변
Sam Chak
2022년 4월 26일
Please verify if the nonlinear equation is correct.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/979880/image.png)
Looks like there are no real solutions for this one.
댓글 수: 4
Sam Chak
2022년 4월 27일
편집: Sam Chak
2022년 4월 27일
@Ali Deniz, Thanks for the correction.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/980245/image.png)
By the way, the nonlinear function
has a limit,
.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/980255/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/980260/image.png)
So, if
, then it has roots. Please check again.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/980265/image.png)
gamma = 1.4;
V_M_2 = 2.0;
% function to be solved
f = @(x) sqrt((gamma + 1)/(gamma - 1))*atan(sqrt((gamma - 1)/(gamma + 1)*(x^2 - 1))) - atan(sqrt(x^2 - 1)) - V_M_2;
% initial guess
x0 = 20;
% root-finding solver
xsol = fzero(f, x0)
xsol =
17.9584
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/980250/image.png)
추가 답변 (1개)
Torsten
2022년 4월 26일
I don't see a root:
gamma=1.4
V_M_2 = 20;
fun = @(M_2)V_M_2 - (sqrt((gamma+1)/(gamma-1)) * atan(sqrt((gamma-1)/(gamma+1)*(M_2-1)))-atan(sqrt(M_2-1)));
M_2 = -20:0.1:200;
plot(M_2,fun(M_2))
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Gamma Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!