I am writing a Mathematica Palette to work with units, and am wondering if anyone knows a way to define new units outside of the standard ones that come with Mathematica 9. I do know of the
which in this specific case makes sense to be non-convertible, but I want to add convertible units such as
MingDynasties. I found an old package that seemed to do this ("Automatic Units package"), but I couldn't get any of the functions to work, even when copied from the included documentation. What I want is to be able to convert from user-defined units to more conventional ones and back again without manually doing it, i.e
Unit[Smoots,67 Inches] (*defines 1 Smoot to be equal to 67 inches*) UnitConvert[5 Smoots, Inches] (*would return 335 inches*) UnitConvert[335 inches,Smoots] (*would return 5 Smoots*)
Since this has been done in a package before, I don't foresee this being impossible, but I am a fairly novice Mathematica Programmer, and could be very mistaken. If anyone has any insight, it would be very much appreciated.