Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.maple > #317
| From | acer <maple@rogers.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.maple |
| Subject | Re: Units conversion |
| Date | 2012-01-18 06:03 -0800 |
| Organization | http://groups.google.com |
| Message-ID | <21384143.2732.1326895386946.JavaMail.geo-discussion-forums@vbxy22> (permalink) |
| References | <ypWdnQ512Msi_4vSnZ2dnUVZ_gednZ2d@megapath.net> |
You can define and use a modified version of the SI system in which volts/meter is the default for expressing items with the same dimensions as of kg*m/s^3*A.
(This is typeset in ascii, but of course the units get printed more nicely with the double [[]] brackets in the GUI.)
restart;
with(ScientificConstants):
E := 30*10^(-15)*Unit('T')*GetValue(Constant(c))*Unit('m')/Unit('s');
449688687 Units:-Unit('T') Units:-Unit('m')
-------------------------------------------
50000000000000 Units:-Unit('s')
combine(E,units);
449688687 /('kg') ('m')\
-------------- Units:-Unit|------------|
50000000000000 | 3 |
\('s') ('A')/
convert(combine(E,units),units,volts/meter);
449688687 /'V'\
-------------- Units:-Unit|---|
50000000000000 \'m'/
simplify(%); # back to where we started, as it is not special to SI
449688687 /('kg') ('m')\
-------------- Units:-Unit|------------|
50000000000000 | 3 |
\('s') ('A')/
# define a new version of SI
Units:-AddSystem(newSI,Units:-GetSystem(SI),volts/meter);
Units:-UseSystem(newSI);
combine(E,units); # now done in one step (and `simplify` does not undo it)
449688687 /'V'\
-------------- Units:-Unit|---|
50000000000000 \'m'/
That should also play reasonably nicely with more automatic simplification of units with arithmetic that one gets after loading Unit:-Standard.
best,
acer
Back to comp.soft-sys.math.maple | Previous | Next — Previous in thread | Find similar | Unroll thread
Units conversion Thomas Dean <tomdean@speakeasy.org> - 2012-01-17 22:12 -0800 Re: Units conversion acer <maple@rogers.com> - 2012-01-18 06:03 -0800
csiph-web