Problem with unit



On 8/12/09, Rafa? Topolnicki <rtopolnicki at o2.pl> wrote:

> I'm playing with unit package and I found problem. For example I would
> like to express W using V,A or S using ohm not SI units.

Well, there is another units package named ezunits which
might work better for you. (Disclaimer: I wrote it.)

The unit package by default converts units to basic SI units.
I think you can change that although I don't know how.
ezunits on the other hand doesn't apply any conversions
automatically, but only if explicitly indicated by the user.

There are other differences as well.
?? ezunits finds the documentation.
demo(ezunits); shows some examples.

Anyway maybe you want stuff like this.

load (ezunits);
foo : x ` V*A;
 => x ` A*V
foo `` W;
 => x ` W
fundamental_units (foo);
 => kg*m^2/s^3
foo `` %;
 => x ` kg*m^2/s^3

bar : y ` S;
 => y ` S
1/bar;
 => 1/y ` 1/S
1/bar `` Ohm;
 => 1/y ` Ohm
fundamental_units (bar);
 => s^3*A^2/(kg*m^2)
bar `` %;
 => y ` s^3*A^2/(kg*m^2)


Depending on how fast your computer is, you might notice
it takes a few seconds or more to compute conversions.
Sorry about that. I'm thinking about a way to speed it up.

Hope this is useful to you in some way.

Robert Dodier