Re: Get numbers out of PhysicalConstants?
- To: mathgroup at smc.vnet.net
- Subject: [mg62612] Re: Get numbers out of PhysicalConstants?
- From: Bill Rowe <readnewsciv at earthlink.net>
- Date: Tue, 29 Nov 2005 04:46:17 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
On 11/28/05 at 1:38 AM, wssaca at gmail.com (Wonseok Shin) wrote: >Is there any way to get numbers out of the constants defined in >Miscellaneous`PhysicalConstants` package? Carrying units all the >time is inconvenient in calculation. >For example, In:= << Miscellaneous`PhysicalConstants` In:= >VacuumPermeability Out= \!\(\(p\ Second\ Volt\)\/\(2500000\ >Ampere\ Meter\)\) >I want to get the number p/2500000 out of VacuumPermeability, >without units. How can I do this? Perhaps the simplest way is to use First or Part, i.e., In:=<< "Miscellaneous`" In:=N[VacuumPermeability][] Out=1.2566370614359173*^-6 This works since In:=FullForm[VacuumPermeability] Out//FullForm= FullForm[(Rational[1, 2500000]*Pi*Second*Volt)/(Ampere*Meter)] And since units are symbols and the default Mathematica ordering is to have the number first in any product using symbols, this works in general. Note for most things such as ElectronCharge usage of N isn't needed, i.e., In:=ElectronCharge[] Out=1.602176462*^-19 since most things are expressed as a machine precision number times some units (expressed as symbols). You might also be interested in some of the packages available from the Wolfram site (MathSource). -- To reply via email subtract one hundred and four