Finding a specific value in Y-axis value with known X-axis value
4 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
采纳的回答
更多回答(1 个)
Dark_Knight
2023-9-15
% 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'
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!