unitsratio
Conversion factor between units
Description
C = unitsratio(
returns the conversion factor targetUnit
,originalUnit
)C
between units so that a value in
the original unit originalUnit
multiplied by
C
provides the equivalent value in the target unit
targetUnit
.
Examples
Find the conversion factor for international feet to meters.
mPerFoot = unitsratio("meter","feet")
mPerFoot = 0.3048
Convert 100 international feet to meters.
m = mPerFoot*100
m = 30.4800
Find the inverse conversion factor and multiply it by the mPerFoot
conversion factor.
unitsratio("feet","meter")*mPerFoot
ans = 1.0000
Input Arguments
Original unit of measure, specified as one of these options:
These angular units.
Value Unit Name "degree"
,"degrees"
,"deg"
Degrees "radian"
,"radians"
,"rad"
Radians Any length unit supported by the
validateLengthUnit
function.Value Unit Name "m"
,"meter"
,"meters"
,"metre"
,"metres"
Meters "cm"
,"centimeter"
,"centimeters"
,"centimetre"
,"centimetres"
Centimeters "mm"
,"millimeter"
,"millimeters"
,"millimetre"
,"millimetres"
Millimeters "micron"
,"microns"
Microns "km"
,"kilometer"
,"kilometers"
,"kilometre"
,"kilometers"
Kilometers "nm"
,"naut mi"
,"nautical mile"
,"nautical miles"
Nautical miles "ft"
,"international ft"
,"foot"
,"international foot"
,"feet"
,"international feet"
Feet "in"
,"inch"
,"inches"
Inches "yd"
,"yds"
,"yard"
,"yards"
Yards "mi"
,"mile"
,"miles"
,"international mile"
,"international miles"
Miles "sf"
,"survey ft"
,"US survey ft"
,"U.S. survey ft"
,"survey foot"
,"US survey foot"
,"U.S. survey foot"
,"survey feet"
,"US survey feet"
,"U.S. survey feet"
U.S. survey feet "sm"
,"survey mile"
,"survey miles"
,"statute mile"
,"statute miles"
,"US survey mile"
,"US survey miles"
,"U.S. survey mile(s)"
,"U.S. survey miles"
U.S. survey miles (statute miles) "Clarke's foot"
,"Clarkes foot"
Clarke's feet "German legal metre"
,"German legal meter"
German legal metres "Indian foot"
Indian feet
This argument is case insensitive.
Data Types: char
| string
Target unit of measure, specified as one of these options:
These angular units.
Value Unit Name "degree"
,"degrees"
,"deg"
Degrees "radian"
,"radians"
,"rad"
Radians Any length unit supported by the
validateLengthUnit
function.Value Unit Name "m"
,"meter"
,"meters"
,"metre"
,"metres"
Meters "cm"
,"centimeter"
,"centimeters"
,"centimetre"
,"centimetres"
Centimeters "mm"
,"millimeter"
,"millimeters"
,"millimetre"
,"millimetres"
Millimeters "micron"
,"microns"
Microns "km"
,"kilometer"
,"kilometers"
,"kilometre"
,"kilometers"
Kilometers "nm"
,"naut mi"
,"nautical mile"
,"nautical miles"
Nautical miles "ft"
,"international ft"
,"foot"
,"international foot"
,"feet"
,"international feet"
Feet "in"
,"inch"
,"inches"
Inches "yd"
,"yds"
,"yard"
,"yards"
Yards "mi"
,"mile"
,"miles"
,"international mile"
,"international miles"
Miles "sf"
,"survey ft"
,"US survey ft"
,"U.S. survey ft"
,"survey foot"
,"US survey foot"
,"U.S. survey foot"
,"survey feet"
,"US survey feet"
,"U.S. survey feet"
U.S. survey feet "sm"
,"survey mile"
,"survey miles"
,"statute mile"
,"statute miles"
,"US survey mile"
,"US survey miles"
,"U.S. survey mile(s)"
,"U.S. survey miles"
U.S. survey miles (statute miles) "Clarke's foot"
,"Clarkes foot"
Clarke's feet "German legal metre"
,"German legal meter"
German legal metres "Indian foot"
Indian feet
This argument is case insensitive.
Data Types: char
| string
Version History
Introduced before R2006a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)