| Aerospace Toolbox | ![]() |
a = convlength(v, ui, uo)
a = convlength(v, ui, uo) computes the conversion factor from specified input length units, ui, to specified output length units, uo, and applies the conversion factor to the input, v, to produce the output, a, in the desired units. v and a are floating-point arrays of size m-by-n. All of the values in v must have the same unit conversions from ui to uo. ui and uo are strings.
Supported unit strings are:
| 'ft' | Feet |
| 'm' | Meters |
| 'km' | Kilometers |
| 'in' | Inches |
| 'mi' | Miles |
| 'naut mi' | Nautical miles |
Convert three lengths from feet to meters:
a = convlength([3 10 20],'ft','m')
a =
0.9144 3.0480 6.0960convacc, convang, convangacc, convangvel, convdensity, convforce, convmass, convpres, convtemp, convvel
![]() | convforce | convmass | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |