Make a standard atmosphere function from an existing spreadsheet tool.
The spreadsheet tool exists as troposphere.xls.
The resulting m-file has a formatted help block:
TROPOS is a spreadsheet-calling function created using MKXLSFUNC. [rho, T, P] = tropos(h, dT) Inputs: h - Altitude (m) dT - Temperature offset (°K) Outputs: rho - Density (kg/m^3) T - Temp (°K) P - Press (Pa) See also MKXLSFUNC, XLSREAD, XLSWRITE. [rho, T, P] = tropos(h, dT)
h = linspace(0,11000,4); rho = arrayfun(@tropos,h); plot(rho,h,'-ok','LineWidth',2) xlabel('Density (kg/m^3)') ylabel('Altitude (m)') title('Troposphere')
Default values are the same as what is in the spreadsheet at the time of the first creation of the function.
[rho, T, P] = tropos
rho = 1.2250 T = 288.1500 P = 101325