Skip to main content
6 of 8
edited tags
Dr. belisarius
  • 116.2k
  • 13
  • 205
  • 456

Implementing CGS unit system in Mathematica 9

So I've just installed the trial version of Mathematica 9. The first noticeable feature for me is the new built-in physical units. I used AutomaticUnits package before, it was almost perfect except that its units aren't usable inside many other functions. But new units can be used everywhere but I can't yet figure out how to implement new units and unit systems or override an old ones. It would be great to have a way to convert units to CGS system.

For reference, that's what I usually do using AutomaticUnits:

Needs["AutomaticUnits`"];
UnitSet["cgs"] = {Centimeter,Gram,Second,Statcoulomb,Statcoulomb/Second};
DeclareUnit["statC", Erg^(1/2) Centimeter^(1/2)];
toCGS[x_] := 
 Convert[Convert[x, "cgs"] /. {"Statcoulomb" -> statC}, "cgs"]
swish
  • 8k
  • 1
  • 28
  • 50