1
$\begingroup$

Is there any documentation on what consists of the unit system "SIBase","Imperial", "SI" and "Metric" in the UnitConvert function, and the rule of what unit is returned in the results? Cause I have notices in doing UnitConvert[Quantity[x, LengthUnit], "Metric"] sometimes returns quantity with units in m, and other times in mm.

$\endgroup$
1
$\begingroup$

i dont know about documentation, but "Metric" and "SI" appear to be the same and give a unit based on the magnitude, while "SIBase" consistently gives meters.

  UnitConvert[Quantity[#, "feet"], "Metric"] & /@ {.00001, 0.001, 
       0.01, .1, 1., 10., 10000.}

{Quantity[3.048, "Micrometers"], Quantity[304.8, "Micrometers"], Quantity[3.048, "Millimeters"], Quantity[3.048, "Centimeters"], Quantity[30.48, "Centimeters"], Quantity[3.048, "Meters"], Quantity[3.048, "Kilometers"]}

  UnitConvert[Quantity[#, "feet"], "SI"] & /@ {.00001, 0.001, 0.01, .1, 
      1., 10., 10000.}

{Quantity[3.048, "Micrometers"], Quantity[304.8, "Micrometers"], Quantity[3.048, "Millimeters"], Quantity[3.048, "Centimeters"], Quantity[30.48, "Centimeters"], Quantity[3.048, "Meters"], Quantity[3.048, "Kilometers"]}

  UnitConvert[Quantity[#, "feet"], "SIBase"] & /@ {.00001, 0.001, 
       0.01, .1, 1., 10., 10000.}

{Quantity[3.048*10^-6, "Meters"], Quantity[0.0003048, "Meters"], Quantity[0.003048, "Meters"], Quantity[0.03048, "Meters"], Quantity[0.3048, "Meters"], Quantity[3.048, "Meters"], Quantity[3048., "Meters"]}

The base unit itself plays into the heuristic as well, example:

UnitConvert[Quantity[.158125 10.^-4, "light year"], "Metric"] -> 1. au
UnitConvert[Quantity[93. 10^6, "Miles"], "Metric"] -> 1.49669 10^8 km
$\endgroup$
  • $\begingroup$ I like your answer, maybe Helpful: Doku andNIST. $\endgroup$ – user9660 Feb 20 '15 at 4:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.