Main Content

convvel

Convert from current velocity units to desired velocity units

Description

example

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.

Examples

collapse all

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

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

    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.

Introduced in R2006b