Mathematica では,どのように単位を使えばよいのでしょうか.
Mathematica で単位を使いたい場合は,Miscellaneous`Units`パッケージをロードすると便利です.
Needs["Miscellaneous`Units`"]
このパッケージがロードされると,270の計量単位と単位変換のための5つの関数が定義されます.変換関数は,Convert,ConvertTemperature,SI,CGS,MKSの5つです.単位はMathematica で使用される他のシンボルと同様に扱われるので,数字に単位を付けて表記することは,数値にシンボルを掛けるようなことです.
このパッケージで定義される単位のほとんどは複数形でなく単数形なので,念のために常に単数形を使ってください.例えば,このパッケージでは3 Acresではなく3 Acreが使われます.しかし,例外もいくつかあります.その一例として,FeetでもFootでも使えるということがあります.このページの下部に全シンボルのリストが記載されています.
単位付きの数字でも乗算できます.
12 Foot * 16 Foot
192 Foot2
複雑な単位も使うことができます.
85 Meter/Second * 10 Second
850 Meter
単位間の変換が実行できます.
Convert[78 Pole, Foot]
1287. Foot
Convert[9.8 Meter/Second, Foot/Second]

温度単位の変換は他とは異なる方法で処理されるので,温度の変換専用の関数が定義されています.
ConvertTemperature[212, Fahrenheit, Celsius]
100
以下は,Miscellaneous`Units`をロードしたときに定義される全シンボルのリストです.
Flatten[Names/@{"Miscellaneous`Units`*",
"Miscellaneous`SIUnits`*"}]
{Abampere, Abcoulomb, Abfarad, Abhenry, Abmho,
Abohm, Abvolt, Acre, AMU, Angstrom, Apostilb, ArcMinute, ArcSecond, Are,
AssayTon, AstronomicalUnit, Atmosphere, AtomicMassUnit, Atto, AU, AvoirdupoisOunce,
AvoirdupoisPound, Bag, BakersDozen, Bale, Bar, Barn, Barrel, Barye, Baud, Biot, Bit,
BoardFoot, BohrMagneton, Bolt, BritishThermalUnit, BTU, Bucket, Bushel, Butt, Cable,
Caliber, Calorie, Candle, Carat, Celsius, Cental, Centi, Centigrade, Centimeter, Century,
CGS, Chain, ChevalVapeur, Cicero, Convert, ConvertTemperature, Cord, Cubit, Cup, Curie,
Dalton, Day, Deca, Decade, Deci, Denier, Didot, DidotPoint, Diopter, Dozen, Drachma, Dyne,
ElectronVolt, Ell, Ephah, Erg, Exa, Fahrenheit, Fathom, Feet, Femto, Fermi, Fifth, Firkin,
FluidDram, FluidOunce, Foot, FootCandle, Fortnight, Furlong, Gal, Gallon, Gauss, Geepound,
Giga, Gilbert, Gill, Grade, Grain, Gram, GramWeight, Gravity, Gross, GrossHundredweight,
Hand, Hectare, Hecto, Hefner, Hogshead, Horsepower, Hour, Hundredweight, ImperialGallon, I
mperialPint, Inch, InchMercury, Jeroboam, Jigger, Kayser, Kilo, KilogramForce, KilogramWeight,
Knot, Lambert, League, Libra, LightYear, Link, Liter, Lumerg, Magnum, Maxwell, Mega,
MetricTon, Mho, Micro, Micron, Mil, Mile, Millennium, Milli, MillimeterMercury, Mina, Minim,
Minute, MKS, Month, Nano, NauticalMile, NetHundredweight, Nibble, Nit, Noggin, NuclearMagneton,
Obolos, Oersted, Omer, Ounce, Parsec, Peck, Pennyweight, Percent, Perch, Peta, Phot, Pica,
Pico, Pint, Poise, Pole, Pondus, Pony, Pound, Poundal, PoundForce, PoundsPerSquareInch,
PoundWeight, PrintersPoint, PSI, Puncheon, Quadrant, Quart, Quintal, Rad, Radian, Rankine,
RegisterTon, Reyn, Rhes, RightAngle, Rod, Roentgen, Rontgen, Rood, Rope, Rutherford,
Rydberg, Seam, Section, Shekel, ShortHundredweight, ShortTon, Shot, SI, SiderealSecond,
SiderealYear, Skein, Slug, SolarMass, Span, Stadion, Stadium, Statampere, Statcoulomb,
Statfarad, Stathenry, Statohm, StatuteMile, Statvolt, Steradian, Stere, Stilb, Stokes,
Stone, SurveyMile, Tablespoon, Talbot, Talent, Teaspoon, Tera, Therm, Ton, TonForce,
Tonne, Torr, Township, TropicalYear, TroyOunce, Tun, UKGallon, UKPint, Week, Wey,
WineBottle, XUnit, Yard, Year, Yocto, Yotta, Zepto, Zetta, Amp, Ampere, Becquerel,
Candela, Coulomb, Farad, Gray, Henry, Hertz, Joule, Kelvin, Kilogram, Lumen, Lux,
Meter, Mole, Ohm, Pascal, Siemens, Tesla, Volt, Watt, Weber}
単位とMathematica でのその使用方法についての詳細は,Documentation
Centerおよび「The Beginner's
Guide to Mathematica Version 4」(Jerry Glynn,Theodore Gray共著)をご覧ください.
| |