Robert Dodier pisze:
> 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
>
Function convert() also do this conversion:
convert(1/ohm,S);
=> S
convert(100*V*A,W);
=> 100W
it's work only when units are equivalent but written in different way.
When they aren't, everything is being converted to basic SI units:
convert(100*V*A*s,W);
=> 100*(kg*m^2/s^2)
but I would like to see W*s. This result is returned even if second
argument is [W,s]. The same with S: convert(ohm,S) should return 1/S.
I tried your ezuints but it works in the same way. I thought that for
convert(ohm,S) maxima do everything whats possible to write ohm using S
rather then kg,m,s,A. But I suppose it's not so easy to code.
Rafal Topolnicki