Main Content

convforce

Convert from force units to specified force units

Description

example

convertedValues = convforce(valuesToConvert,inputForceUnits,outputForceUnits) computes the conversion factor from specified input force units to specified output force units. The function then applies the conversion factor to the input to produce the output in the specified units.

Examples

collapse all

Convert three forces from pound force to newtons.

a = convforce([120 1 5],'lbf','N')
a = 1×3

  533.7866    4.4482   22.2411

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 inputForceUnits to outputForceUnits.

Data Types: double

Input force units, specified as one of these.

'lbf'Pound force
'N'Newton

Data Types: string

Output force units, specified as one of these.

'lbf'Pound force
'N'Newton

Data Types: string

Output Arguments

collapse all

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

Version History

Introduced in R2006b