如何绘制显示压力、声速、密度和温度随高度变化的曲线图?
国际标准大气模型捕捉到了这一点,但我需要在MATLAB中完成。
发布于 2019-10-27 23:54:32
使用航空航天工具箱,这看起来像是对atmosisa和subplot的直接使用。

相关的假设和度量单位在documentation中。
% MATLAB R2019a
height = [0:1000:20000]; % meters
[T, a, P, rho] = atmosisa(height);
% Plot
figure
s(1) = subplot(2,2,1)
plot(height,T)
ylabel('Temperature (K)')
s(2) = subplot(2,2,2)
plot(height,a)
ylabel('Speed of Sound (m/s)')
s(3) = subplot(2,2,3)
plot(height,P)
ylabel('Pressure (Pa)')
s(4) = subplot(2,2,4)
plot(height,rho)
ylabel('Density (kg/m^3)')
% Cosmetics
for jj = 1:4
xlabel(s(jj),'Height (m)') % Common label for x-axis
ax = s(jj);
ax.XRuler.Exponent = 0; % Remove scientific notation
ax.YRuler.Exponent = 0;
endhttps://stackoverflow.com/questions/58580507
复制相似问题