Main Content

convpres

Convert from pressure units to specified pressure units

Description

convertedValues = convpres(valuesToConvert,inputPressureUnits,outputPressureUnits) computes the conversion factor from specified input pressure units to specified output pressure units. The function then applies the conversion factor to the input to produce the output in the specified units.

example

Examples

collapse all

Convert two pressures from pound force per square inch to atmospheres.

a = convpres([14.696  35],'psi','atm')
a = 1×2

    1.0000    2.3816

Input Arguments

collapse all

Values to convert, specified as a floating-point array of size m-by-n. All values must have the same unit conversions from inputPressureUnits to outputPressureUnits.

Input pressure units, specified as one of these.

'psi'Pound force per square inch
'Pa'Pascal
'psf'Pound force per square foot
'atm'Atmosphere

Output pressure units, specified as one of these.

'psi'Pound force per square inch
'Pa'Pascal
'psf'Pound force per square foot
'atm'Atmosphere

Output Arguments

collapse all

Converted values, returned as a floating-point array of size m-by-n.

Version History

Introduced in R2006b