Is there a tutorial page that have all Mathematica units? I sometimes have hard time figuring out the correct unit spelling when using quantities
2 Answers
$\begingroup$
$\endgroup$
6
This should list you all available units in Mathematica.
Needs["QuantityUnits`"]
Keys[QuantityUnits`Private`$UnitReplacementRules]
Inspired by eldo I made a little dynamic interface:
Needs["QuantityUnits`"]
table = Keys[QuantityUnits`Private`$UnitReplacementRules];
Panel[DynamicModule[{f = ""},
Column[{Text[Style["Mathematica Unit Search:", Bold]],
InputField[Dynamic[f], String, ContinuousAction -> True],
Dynamic[Union@Flatten[StringCases[#, ___ ~~ f ~~ ___] & /@ table] //
TableForm]}]]]
-
2$\begingroup$ Notice the typo: "FeetfRainfall" (reported to Support) $\endgroup$– pawCommented Sep 3, 2014 at 18:13
-
$\begingroup$ That panels make Mathematica 10 crash if pressing "panel format" in the suggestion bar. Can anybody confirm that please? $\endgroup$– rhermansCommented Sep 4, 2014 at 12:28
-
1$\begingroup$ Can confirm! (Windows 7 64-bit, MMA10) $\endgroup$– pawCommented Sep 4, 2014 at 13:23
-
$\begingroup$ Thanks for the confirmation. I'm Not in front of a proper computer now, I will file a report in a few hours unless somebody else does it before me. $\endgroup$– rhermansCommented Sep 4, 2014 at 13:27
-
$\begingroup$ Do that! Funny how this answer revealed a typo and a bug. $\endgroup$– pawCommented Sep 4, 2014 at 13:30
$\begingroup$
$\endgroup$
Expanding a little bit on paw's nice discovery:
Needs["QuantityUnits`"]
table = Keys[QuantityUnits`Private`$UnitReplacementRules];
Since this table is very long one can restrict the output, f.e. with
Union @ Flatten[StringCases[#, "Feet" ~~ ___] & /@ table] // TableForm
UPDATE
A similar question could arise with the more than 1000 inbuilt formula names:
formulas = FormulaLookup[All];
Find all formulas including "speed":
(speed =
Union@Flatten[
StringCases[#, ___ ~~ "speed" ~~ ___, IgnoreCase -> True] & /@
formulas]) // Multicolumn
Extract those with FormulaData
:
(inter = Intersection[FormulaData[], speed]) // Multicolumn
TraditionalForm@
Framed[Grid[{#, FormulaData[#]} & /@ inter,
Dividers -> All,
Spacings -> {{2, 2}, 3},
Alignment -> Left,
BaseStyle -> {FontFamily -> "Helvetica"},
Background -> {None, {{Hue[.6, .15, .9], GrayLevel[.9]}}},
FrameStyle -> Directive[Thick, White]
],
FrameMargins -> 0.5,
FrameStyle -> GrayLevel[.7]]
WolframAlpha["units for volume"]
orWolframAlpha["SI units"]
$\endgroup$