Main Content

convangvel

Convert from angular velocity units to desired angular velocity units

Description

convertedValues = convangvel(valuesToConvert,inputAngularVelocityUnits,outputAngularVelocityUnits) computes the conversion factor from specified input angular velocity units to specified output angular velocity units. The function then applies the conversion factor to the input to produce the output in the specified units.

example

Examples

collapse all

Convert three angular velocities from degrees per second to radians per second.

a = convangvel([0.3 0.1 0.5],'deg/s','rad/s')
a = 1×3

    0.0052    0.0017    0.0087

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 inputAngularVelocityUnits to outputAngularVelocityUnits.

Data Types: double

Input angular velocity units, specified as one of these values.

'deg/s'Degrees per second
'rad/s'Radians per second
'rpm'Revolutions per minute

Data Types: string

Output angular velocity units, specified as one of these values.

'deg/s'Degrees per second
'rad/s'Radians per second
'rpm'Revolutions per minute

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