This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

convmass

Convert from mass units to desired mass units

Syntax

convertedValues = convmass(valuesToConvert, inputMassUnits, outputMassUnits)

Description

convertedValues = convmass(valuesToConvert, inputMassUnits, outputMassUnits) computes the conversion factor from specified input mass units to specified output mass 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 inputMassUnits to outputMassUnits.

inputMassUnits

Specified input mass units. Supported units are:

'lbm'Pound mass
'kg'Kilograms
'slug'Slugs

outputMassUnits

Specified output mass units. Supported units are:

'lbm'Pound mass
'kg'Kilograms
'slug'Slugs

Output Arguments

convertedValues

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

Examples

Convert three masses from pound mass to kilograms:

a = convmass([3 1 5],'lbm','kg')

a =

    1.3608    0.4536    2.2680

Introduced in R2006b