How can I calculate the value in an equation?

7 ビュー (過去 30 日間)
Ali Deniz
Ali Deniz 2022 年 4 月 26 日
編集済み: Sam Chak 2022 年 4 月 27 日
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.

採用された回答

Sam Chak
Sam Chak 2022 年 4 月 26 日
Please verify if the nonlinear equation is correct.
Looks like there are no real solutions for this one.
  4 件のコメント
Ali Deniz
Ali Deniz 2022 年 4 月 27 日
That's right, I should find another way. Thank you.
Sam Chak
Sam Chak 2022 年 4 月 27 日
編集済み: Sam Chak 2022 年 4 月 27 日
@Ali Deniz, Thanks for the correction.
By the way, the nonlinear function has a limit, .
So, if , then it has roots. Please check again.
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

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

その他の回答 (1 件)

Torsten
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))

カテゴリ

Help Center および File ExchangeAcoustics, Noise and Vibration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by