convpres

Convert from pressure units to desired pressure units

Syntax

convertedValues= convpres(valuesToConvert, inputPressureUnits, outputPressureUnits)

Description

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

Input Arguments

valuesToConvert

Floating-point array of size m-by-n values that the function is to convert. All values must have the same unit conversions from inputPressureUnits to outputPressureUnits.

inputPressureUnits

Specified input pressure units, as strings. Supported unit strings are:

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

outputPressureUnits

Specified output pressure units, as strings. Supported unit strings are:

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

Output Arguments

convertedValues

Floating-point array of size m-by-n values that the function has converted.

Examples

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

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

a =

    1.0000    2.3816
Was this topic helpful?