フィルターのクリア

Finding a specific value in Y-axis value with known X-axis value

7 ビュー (過去 30 日間)
Ke Yeun Yong
Ke Yeun Yong 2023 年 9 月 15 日
コメント済み: Matt J 2023 年 9 月 15 日
Hi, I am trying to find a specific value in Y-axis value with known X-axis value as follow;
Alt = [11000,12000,13000,14000,15000,16000,17000,18000]; % Altitude [m]
Relative_density_ISA = [0.2971,0.2537,0.2167,0.1851,0.1581,0.1350,0.1153,0.0985]; % Relative density under ISA
I am trying to find the altitude which relative density 0.1291 is at.
I applied the -> R_D_wanted =interp1(Alt,Relative_density_ISA,0.1291);
but it gives me NaN result.
Please help, very much appreciated.

採用された回答

Matt J
Matt J 2023 年 9 月 15 日
編集済み: Matt J 2023 年 9 月 15 日
Alt = [11000,12000,13000,14000,15000,16000,17000,18000]; % Altitude [m]
Relative_density_ISA = [0.2971,0.2537,0.2167,0.1851,0.1581,0.1350,0.1153,0.0985]; % Relative density under ISA
Alt_wanted =interp1(Relative_density_ISA,Alt,0.1291,'linear')
Alt_wanted = 1.6299e+04
  2 件のコメント
Ke Yeun Yong
Ke Yeun Yong 2023 年 9 月 15 日
Thank you very much 😃
Matt J
Matt J 2023 年 9 月 15 日
You're welcome, but please Accept-click the answer to indicate that it worked.

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

その他の回答 (1 件)

Dark_Knight
Dark_Knight 2023 年 9 月 15 日
Hello Ke Yeun Yong , hope this helps.
% Given Input Data
Alt = [11000, 12000, 13000, 14000, 15000, 16000, 17000, 18000];
Relative_density_ISA = [0.2971, 0.2537, 0.2167, 0.1851, 0.1581, 0.1350, 0.1153, 0.0985];
% Relative Density required
R_D_wanted = interp1(Relative_density_ISA, Alt, 0.1291); % 1.6299e+04
% Relative Density required
R_D_wanted = num2str(interp1(Relative_density_ISA, Alt, 0.1291)); % '16299.4924'

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by