1/21/13

Conversion of Units

maxima maxima_ezunits

Operator` is The dimensional quantity operator. 
load(ezunits) enables this operator.

Conversions for products, quotients, and powers of units are derived 
from the set of known unit conversions. 

km = 1000*m
cm = m/100
mm = m/1000
micrometer = m/1000000
micron = micrometer
inch = feet/12
feet = 381*m/1250
ft = feet

Mg = 1000*kg
metric_ton = Mg
g = kg/1000
microgram = kg/1000000000
pound_mass = 200*kg/441
ounce = pound_mass/16
oz = ounce

Example:

    (%i) load(ezunits);
    (%i) (((1/2) ` inch) `` mm), numer;
    (%o) 12.7 ` mm
    

maxima maxima_ezunits