[Maxima] using units in Maxima?
smustudent1 at yahoo.com
Wed Feb 1 13:13:15 CST 2006
--- Barton Willis <willisb at unk.edu> wrote:
> > In his example, done in Mathcad, he includes units with
> > his value assignments and calculations. It it possible to do such
> > a thing in Maxima? If so, how? Thanks.
> > -Ron Crummett
> Maybe something simple will work for you:
> (%i1) l : 6.23 * 'feet$
> (%i2) w : 5.89 * 'feet$
> (%i3) area = l * w;
> (%o3) area=36.694699999999997*feet^2
> (%i4) subst(feet = mile / 5280,%);
> (%o4) area=1.3162412477043157*10^-6*mile^2
Definitely the simplest option.
> Alternatively, there is a 'units' package (try load(units)).
> But I don't know how to use the package or if it works.
There are two other "unit" packages in the contrib directory - Robert's
might be the better bet, since he is active in Maxima and could help
you debug it. The other one I wrote (with a lot of help from Barton
et. al.) but while it is close to being at least functional in the
programming sense (there are some bugs I never did get ironed out) it
would take some polishing and is rather short on unit definitions and
advanced features. There is quite a lot of email concerning both
options in the archives if you are inclined toward development :-).
I've switched focus and am currently trying to get a Units package
defined for the Axiom computer algebra system, but that project is
rather more long term and won't produce anything practical for a while.
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
More information about the Maxima