Main Content


Calculate pressure altitude based on ambient pressure


pressureAltitude = atmospalt(pressure, action)


pressureAltitude = atmospalt(pressure, action) computes the pressure altitude based on ambient pressure. Pressure altitude is the altitude with specified ambient pressure in the 1976 Committee on Extension to the Standard Atmosphere (COESA) United States standard. Pressure altitude is the same as the mean sea level (MSL) altitude.

This function extrapolates altitude values logarithmically below the pressure of 0.3961 Pa (approximately 0.00006 psi) and above the pressure of 101,325 Pa (approximately 14.7 psi).

This function assumes that air is dry and an ideal gas.

Input Arguments


Array of m-by-1 ambient pressures, in pascal.


Action for out-of-range input. Specify one:

'Warning' (default)

Output Arguments


Array of m-by-1 pressure altitudes or MSL altitudes, in meters.


Calculate the pressure altitude at a static pressure of 101,325 Pa with warnings for out-of-range inputs:

h = atmospalt(101325)

h =


Calculate the pressure altitude at static pressures of 101,325 Pa and 26,436 Pa with errors for out-of-range inputs:

h = atmospalt([101325 26436], 'Error' )

h =

  1.0e+004 *

         0    1.0000


U.S. Standard Atmosphere, 1976, U.S. Government Printing Office, Washington, D.C.

Introduced in R2006b