conversion table - Maple Help

convert/conversion_table

convert a list of units into a conversion table

 Calling Sequence convert([L1, L2], conversion_table, opts) convert(L, conversion_table, opts)

Parameters

 L1, L2, L - lists of symbols; unit names or symbols opts - (optional) equation(s) of the form option=value where option is one of energy, filter, order, output, or symbolic; specify options for the conversion

Description

 • The convert([L1, L2], conversion_table) function creates a table indexed by the cartesian product of the lists L1 and L2 where the entries are the conversion factors from the first index to the second.
 • The convert(L, conversion_table) function is a short form for convert([L, L], conversion_table).
 • When a conversion factor cannot be found between two valid units, the entry in the table is FAIL.
 • You can modify the properties of the conversion by including options opts. The opts argument can contain one or more of the following equations.
 energy = true or false
 This option is passed as an option to the convert/units routine.  If this option is set to true, the conversion can be between energy units, not only units with the same dimension. See Energy Conversions. The default value is false.
 filter = anything
 This option is a filter applied to the conversion factors.  For example, $\mathrm{filter}={\mathrm{evalf}}_{5}$ evaluates all conversion factors to five digit floating-point numbers.
 order =lexorder or a procedure
 This option specifies the order in which names should be listed. The order can be specified by a procedure or be the lexicographical order (see sort). The value of this option determines the output order only for output=grid or columns.
 output = table, grid, columns
 By default, output=table. The output is a table as described above.
 If this option is set to grid, a formatted table is returned with unit names and unit symbols of the list L1 in the first two columns, and unit symbols of the list L2 (where available) in the first row.
 If this option is set to columns, a formatted table is returned. In the first column, the unit names from L1 are listed in order. For each entry in the first column, an entry in the second column appears for each unit in L2 for which a conversion exists along with conversion factor in the third column.
 symbolic = true or false
 This option is passed to the convert/units function as an option. The default value is false.

Examples

 > $L≔\left[\mathrm{newton},\mathrm{gf},\mathrm{pond},\mathrm{sthene},\mathrm{dyne},\mathrm{ozf},\mathrm{lbf},\mathrm{tonforce},\mathrm{poundal},\mathrm{kipf}\right]:$
 > $A≔\mathrm{convert}\left(L,\mathrm{conversion_table}\right):$
 > ${A}_{\mathrm{newton},\mathrm{gf}}$
 $\frac{{20000000}}{{196133}}$ (1)
 > ${A}_{\mathrm{dyne},\mathrm{ozf}}$
 $\frac{{320000000}}{{8896443230521}}$ (2)
 > $\mathrm{convert}\left(\left[N,\mathrm{poundal},\mathrm{lbf}\right],\mathrm{conversion_table},\mathrm{output}=\mathrm{grid},\mathrm{filter}={\mathrm{evalf}}_{4}\right)$
 $\left[\begin{array}{cccccc}{}& {}& {\mathrm{To:}}& {N}& {\mathrm{poundals}}& {\mathrm{lbf}}\\ {\mathrm{Unit Name}}& {\mathrm{Symbol}}& {}& {}& {}& {}\\ {\mathrm{newtons}}& {N}& {}& {1.}& {7.233}& {0.2248}\\ {\mathrm{poundals}}& {}& {}& {0.1383}& {1.}& {0.03108}\\ {\mathrm{poundforces}}& {\mathrm{lbf}}& {}& {4.448}& {32.17}& {1.}\end{array}\right]$ (3)
 > $\mathrm{convert}\left(\left[\left[W,\mathrm{hp},\mathrm{poncelet},\mathrm{abW},\mathrm{statW},\frac{\mathrm{erg}}{s}\right],\left[W,\mathrm{hp},\frac{\mathrm{erg}}{s}\right]\right],\mathrm{conversion_table},\mathrm{output}=\mathrm{grid},\mathrm{filter}={\mathrm{evalf}}_{4},\mathrm{order}=\mathrm{lexorder}\right)$
 $\left[\begin{array}{cccccc}{}& {}& {\mathrm{To:}}& \frac{{\mathrm{erg}}}{{s}}& {\mathrm{hp}}& {W}\\ {\mathrm{Unit Name}}& {\mathrm{Symbol}}& {}& {}& {}& {}\\ {\mathrm{ergs per second}}& \frac{{\mathrm{erg}}}{{s}}& {}& {1.}& {1.341}{×}{{10}}^{{-10}}& {1.}{×}{{10}}^{{-7}}\\ {\mathrm{abwatts}}& {\mathrm{abW}}& {}& {1.}& {1.341}{×}{{10}}^{{-10}}& {1.}{×}{{10}}^{{-7}}\\ {\mathrm{horsepowers}}& {\mathrm{hp}}& {}& {7.457}{×}{{10}}^{{9}}& {1.}& {745.7}\\ {\mathrm{poncelets}}& {}& {}& {9.807}{×}{{10}}^{{9}}& {1.315}& {980.7}\\ {\mathrm{statwatts}}& {\mathrm{statW}}& {}& {1.}& {1.341}{×}{{10}}^{{-10}}& {1.}{×}{{10}}^{{-7}}\\ {\mathrm{watts}}& {W}& {}& {1.}{×}{{10}}^{{7}}& {0.001341}& {1.}\end{array}\right]$ (4)
 > $\mathrm{convert}\left(\left[\mathrm{mm},\mathrm{cm},\mathrm{dm},m\right],\mathrm{conversion_table},\mathrm{output}=\mathrm{grid}\right)$
 $\left[\begin{array}{ccccccc}{}& {}& {\mathrm{To:}}& {\mathrm{mm}}& {\mathrm{cm}}& {\mathrm{dm}}& {m}\\ {\mathrm{Unit Name}}& {\mathrm{Symbol}}& {}& {}& {}& {}& {}\\ {\mathrm{millimeters}}& {\mathrm{mm}}& {}& {1}& \frac{{1}}{{10}}& \frac{{1}}{{100}}& \frac{{1}}{{1000}}\\ {\mathrm{centimeters}}& {\mathrm{cm}}& {}& {10}& {1}& \frac{{1}}{{10}}& \frac{{1}}{{100}}\\ {\mathrm{decimeters}}& {\mathrm{dm}}& {}& {100}& {10}& {1}& \frac{{1}}{{10}}\\ {\mathrm{meters}}& {m}& {}& {1000}& {100}& {10}& {1}\end{array}\right]$ (5)
 > $\mathrm{convert}\left(\left[\left[\frac{1}{m},\frac{J}{\mathrm{mol}},\mathrm{E0},\frac{1}{s},\mathrm{kg},\mathrm{cal}\right],\left[\mathrm{kg},\frac{J}{\mathrm{mol}}\right]\right],\mathrm{conversion_table},\mathrm{output}=\mathrm{grid},\mathrm{energy},\mathrm{filter}={\mathrm{evalf}}_{4}\right)$
 $\left[\begin{array}{ccccc}{}& {}& {\mathrm{To:}}& {\mathrm{kg}}& \frac{{J}}{{\mathrm{mol}}}\\ {\mathrm{Unit Name}}& {\mathrm{Symbol}}& {}& {}& {}\\ {\mathrm{1 per meter}}& \frac{{1}}{{m}}& {}& {2.21}{×}{{10}}^{{-42}}& {0.1196}\\ {\mathrm{joules per mole}}& \frac{{J}}{{\mathrm{mol}}}& {}& {1.848}{×}{{10}}^{{-41}}& {1.}\\ {\mathrm{hartrees}}& {\mathrm{E0}}& {}& {4.851}{×}{{10}}^{{-35}}& {2.625}{×}{{10}}^{{6}}\\ {\mathrm{1 per second}}& \frac{{1}}{{s}}& {}& {7.372}{×}{{10}}^{{-51}}& {3.99}{×}{{10}}^{{-10}}\\ {\mathrm{kilograms}}& {\mathrm{kg}}& {}& {1.}& {5.412}{×}{{10}}^{{40}}\\ {\mathrm{calories}}& {\mathrm{cal}}& {}& {4.655}{×}{{10}}^{{-17}}& {2.52}{×}{{10}}^{{24}}\end{array}\right]$ (6)
 > $\mathrm{convert}\left(\left[{\mathrm{Units}}_{\mathrm{GetUnits}}\left(\mathrm{dimension}=\mathrm{force}\right)\right],\mathrm{conversion_table},\mathrm{output}=\mathrm{columns},\mathrm{energy},\mathrm{filter}={\mathrm{evalf}}_{4}\right)$
 $\left[\begin{array}{ccc}{\mathrm{Units From:}}& {\mathrm{Units To:}}& {\mathrm{Conversion Factor:}}\\ {}& {}& {}\\ {\mathrm{dynes}}& {\mathrm{gf}}& {0.00102}\\ {}& {\mathrm{kip}}& {2.248}{×}{{10}}^{{-9}}\\ {}& {\mathrm{kipf}}& {2.248}{×}{{10}}^{{-9}}\\ {}& {N}& {0.00001}\\ {}& {\mathrm{ozf}}& {0.00003597}\\ {}& {\mathrm{planck_force}}& {8.262}{×}{{10}}^{{-50}}\\ {}& {\mathrm{pond}}& {0.00102}\\ {}& {\mathrm{poundal}}& {0.00007233}\\ {}& {\mathrm{lbf}}& {2.248}{×}{{10}}^{{-6}}\\ {}& {\mathrm{sn}}& {1.}{×}{{10}}^{{-8}}\\ {}& {\mathrm{tonf}}& {1.124}{×}{{10}}^{{-9}}\\ {\mathrm{gramforces}}& {\mathrm{dyn}}& {980.7}\\ {}& {\mathrm{kip}}& {2.205}{×}{{10}}^{{-6}}\\ {}& {\mathrm{kipf}}& {2.205}{×}{{10}}^{{-6}}\\ {}& {N}& {0.009807}\\ {}& {\mathrm{ozf}}& {0.03527}\\ {}& {\mathrm{planck_force}}& {8.103}{×}{{10}}^{{-47}}\\ {}& {\mathrm{pond}}& {1.}\\ {}& {\mathrm{poundal}}& {0.07093}\\ {}& {\mathrm{lbf}}& {0.002205}\\ {}& {\mathrm{sn}}& {9.807}{×}{{10}}^{{-6}}\\ {}& {\mathrm{tonf}}& {1.102}{×}{{10}}^{{-6}}\\ {\mathrm{kips}}& {\mathrm{dyn}}& {4.448}{×}{{10}}^{{8}}\\ {}& {\mathrm{gf}}& {453600.}\\ {}& {\mathrm{kipf}}& {1.}\\ {}& {N}& {4448.}\\ {}& {\mathrm{ozf}}& {16000.}\\ {}& {\mathrm{planck_force}}& {3.675}{×}{{10}}^{{-41}}\\ {}& {\mathrm{pond}}& {453600.}\\ {}& {\mathrm{poundal}}& {32170.}\\ {}& {\mathrm{lbf}}& {1000.}\\ {}& {\mathrm{sn}}& {4.448}\\ {}& {\mathrm{tonf}}& {0.5}\\ {\mathrm{kipf}}& {\mathrm{dyn}}& {4.448}{×}{{10}}^{{8}}\\ {}& {\mathrm{gf}}& {453600.}\\ {}& {\mathrm{kip}}& {1.}\\ {}& {N}& {4448.}\\ {}& {\mathrm{ozf}}& {16000.}\\ {}& {\mathrm{planck_force}}& {3.675}{×}{{10}}^{{-41}}\\ {}& {\mathrm{pond}}& {453600.}\\ {}& {\mathrm{poundal}}& {32170.}\\ {}& {\mathrm{lbf}}& {1000.}\\ {}& {\mathrm{sn}}& {4.448}\\ {}& {\mathrm{tonf}}& {0.5}\\ {\mathrm{newtons}}& {\mathrm{dyn}}& {100000.}\\ {}& {\mathrm{gf}}& {102.}\\ {}& {\mathrm{kip}}& {0.0002248}\\ {}& {\mathrm{kipf}}& {0.0002248}\\ {}& {\mathrm{ozf}}& {3.597}\\ {}& {\mathrm{planck_force}}& {8.262}{×}{{10}}^{{-45}}\\ {}& {\mathrm{pond}}& {102.}\\ {}& {\mathrm{poundal}}& {7.233}\\ {}& {\mathrm{lbf}}& {0.2248}\\ {}& {\mathrm{sn}}& {0.001}\\ {}& {\mathrm{tonf}}& {0.0001124}\\ {\mathrm{ounceforces}}& {\mathrm{dyn}}& {27800.}\\ {}& {\mathrm{gf}}& {28.35}\\ {}& {\mathrm{kip}}& {0.0000625}\\ {}& {\mathrm{kipf}}& {0.0000625}\\ {}& {N}& {0.278}\\ {}& {\mathrm{planck_force}}& {2.297}{×}{{10}}^{{-45}}\\ {}& {\mathrm{pond}}& {28.35}\\ {}& {\mathrm{poundal}}& {2.011}\\ {}& {\mathrm{lbf}}& {0.0625}\\ {}& {\mathrm{sn}}& {0.000278}\\ {}& {\mathrm{tonf}}& {0.00003125}\\ {\mathrm{planck forces}}& {\mathrm{dyn}}& {1.21}{×}{{10}}^{{49}}\\ {}& {\mathrm{gf}}& {1.234}{×}{{10}}^{{46}}\\ {}& {\mathrm{kip}}& {2.721}{×}{{10}}^{{40}}\\ {}& {\mathrm{kipf}}& {2.721}{×}{{10}}^{{40}}\\ {}& {N}& {1.21}{×}{{10}}^{{44}}\\ {}& {\mathrm{ozf}}& {4.353}{×}{{10}}^{{44}}\\ {}& {\mathrm{pond}}& {1.234}{×}{{10}}^{{46}}\\ {}& {\mathrm{poundal}}& {8.754}{×}{{10}}^{{44}}\\ {}& {\mathrm{lbf}}& {2.721}{×}{{10}}^{{43}}\\ {}& {\mathrm{sn}}& {1.21}{×}{{10}}^{{41}}\\ {}& {\mathrm{tonf}}& {1.36}{×}{{10}}^{{40}}\\ {\mathrm{ponds}}& {\mathrm{dyn}}& {980.7}\\ {}& {\mathrm{gf}}& {1.}\\ {}& {\mathrm{kip}}& {2.205}{×}{{10}}^{{-6}}\\ {}& {\mathrm{kipf}}& {2.205}{×}{{10}}^{{-6}}\\ {}& {N}& {0.009807}\\ {}& {\mathrm{ozf}}& {0.03527}\\ {}& {\mathrm{planck_force}}& {8.103}{×}{{10}}^{{-47}}\\ {}& {\mathrm{poundal}}& {0.07093}\\ {}& {\mathrm{lbf}}& {0.002205}\\ {}& {\mathrm{sn}}& {9.807}{×}{{10}}^{{-6}}\\ {}& {\mathrm{tonf}}& {1.102}{×}{{10}}^{{-6}}\\ {\mathrm{poundals}}& {\mathrm{dyn}}& {13830.}\\ {}& {\mathrm{gf}}& {14.1}\\ {}& {\mathrm{kip}}& {0.00003108}\\ {}& {\mathrm{kipf}}& {0.00003108}\\ {}& {N}& {0.1383}\\ {}& {\mathrm{ozf}}& {0.4973}\\ {}& {\mathrm{planck_force}}& {1.142}{×}{{10}}^{{-45}}\\ {}& {\mathrm{pond}}& {14.1}\\ {}& {\mathrm{lbf}}& {0.03108}\\ {}& {\mathrm{sn}}& {0.0001383}\\ {}& {\mathrm{tonf}}& {0.00001554}\\ {\mathrm{poundforces}}& {\mathrm{dyn}}& {444800.}\\ {}& {\mathrm{gf}}& {453.6}\\ {}& {\mathrm{kip}}& {0.001}\\ {}& {\mathrm{kipf}}& {0.001}\\ {}& {N}& {4.448}\\ {}& {\mathrm{ozf}}& {16.}\\ {}& {\mathrm{planck_force}}& {3.675}{×}{{10}}^{{-44}}\\ {}& {\mathrm{pond}}& {453.6}\\ {}& {\mathrm{poundal}}& {32.17}\\ {}& {\mathrm{sn}}& {0.004448}\\ {}& {\mathrm{tonf}}& {0.0005}\\ {\mathrm{sthene}}& {\mathrm{dyn}}& {1.}{×}{{10}}^{{8}}\\ {}& {\mathrm{gf}}& {102000.}\\ {}& {\mathrm{kip}}& {0.2248}\\ {}& {\mathrm{kipf}}& {0.2248}\\ {}& {N}& {1000.}\\ {}& {\mathrm{ozf}}& {3597.}\\ {}& {\mathrm{planck_force}}& {8.262}{×}{{10}}^{{-42}}\\ {}& {\mathrm{pond}}& {102000.}\\ {}& {\mathrm{poundal}}& {7233.}\\ {}& {\mathrm{lbf}}& {224.8}\\ {}& {\mathrm{tonf}}& {0.1124}\\ {\mathrm{tonforces}}& {\mathrm{dyn}}& {8.896}{×}{{10}}^{{8}}\\ {}& {\mathrm{gf}}& {907200.}\\ {}& {\mathrm{kip}}& {2.}\\ {}& {\mathrm{kipf}}& {2.}\\ {}& {N}& {8896.}\\ {}& {\mathrm{ozf}}& {32000.}\\ {}& {\mathrm{planck_force}}& {7.351}{×}{{10}}^{{-41}}\\ {}& {\mathrm{pond}}& {907200.}\\ {}& {\mathrm{poundal}}& {64350.}\\ {}& {\mathrm{lbf}}& {2000.}\\ {}& {\mathrm{sn}}& {8.896}\end{array}\right]$ (7)