Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

convacc

Convert from acceleration units to desired acceleration units

Syntax

convertedValues = convacc(valuesToConvert, inputAccelUnits, outputAccelUnits)

Description

convertedValues = convacc(valuesToConvert, inputAccelUnits, outputAccelUnits) computes the conversion factor from specified input acceleration units to specified output acceleration 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 inputAccelUnits to outputAccelUnits.

inputAccelUnits

Specified input acceleration units. Supported units are:

'ft/s^2'Feet per second squared
'm/s^2'Meters per second squared
'km/s^2'Kilometers per second squared
'in/s^2'Inches per second squared
'km/h-s'Kilometers per hour per second
'mph/s'Miles per hour per second
'G''s'g-units

outputAccelUnits

Specified output acceleration units. Supported units are:

'ft/s^2'Feet per second squared
'm/s^2'Meters per second squared
'km/s^2'Kilometers per second squared
'in/s^2'Inches per second squared
'km/h-s'Kilometers per hour per second
'mph/s'Miles per hour per second
'G''s'g-units

Output Arguments

convertedValues

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

Examples

Convert three accelerations from feet per second squared to meters per second squared:

a = convacc([3 10 20],'ft/s^2','m/s^2')

a =

    0.9144    3.0480    6.0960

Introduced in R2006b

Was this topic helpful?