Main Content

convvel

Convert from current velocity units to desired velocity units

Description

convertedValues = convvel(valuesToConvert,inputVelocityUnits,outputVelocityUnits) converts all velocity values from input velocity units to output velocity units. All values have the same unit conversions from inputVelocityUnits to outputVelocityUnits.

example

Examples

collapse all

Convert three velocities from feet per minute to meters per second.

a = convvel([30 100 250],'ft/min','m/s')
a = 1×3

    0.1524    0.5080    1.2700

Input Arguments

collapse all

Velocity values to convert, specified as floating-point array of size m-by-n.

Data Types: double

Input velocity units, specified as one of these values.

'ft/s'Feet per second
'm/s'Meters per second
'km/s'Kilometers per second
'in/s'Inches per second
'km/h'Kilometers per hour
'mph'Miles per hour
'kts'Knots
'ft/min'Feet per minute

Data Types: string

Output velocities, specified as one of these values.

'ft/s'Feet per second
'm/s'Meters per second
'km/s'Kilometers per second
'in/s'Inches per second
'km/h'Kilometers per hour
'mph'Miles per hour
'kts'Knots
'ft/min'Feet per minute

Data Types: string

Output Arguments

collapse all

Output velocities, returned as an array or scalar in specified units.

Version History

Introduced in R2006b