convert/system - convert a unit to the default unit in a system of units
|
Calling Sequence
|
|
convert(u, system, unitFrom, systemTo, opts)
convert(u*Unit(unitFrom), system, systemTo, opts)
convert(dim, system, systemTo, dimension=true, opts)
|
|
Parameters
|
|
u
|
-
|
expression
|
dim
|
-
|
dimension
|
unitFrom
|
-
|
symbol; unit to be converted from
|
systemTo
|
-
|
(optional) symbol; system of units to be converted to
|
opts
|
-
|
(optional) equation(s) of the form option=value where option is one of base, dimension or symbolic; specify options for the conversion
|
|
|
|
|
Description
|
|
•
|
The convert(u, system, unitFrom, systemTo) function multiplies the value u by the conversion factor to convert from the unit UnitFrom to the default unit of the same dimension in the system of units SystemTo.
|
•
|
The function Unit can be either Units[Unit] or the Unit routine from the Units[Standard] or the Units[Natural] environment.
|
•
|
The unit unitFrom and system SystemTo can be any unit label, for example, name or symbol, accepted by the Units package.
|
|
Note: Temperature conversions are for temperature intervals not absolute temperatures. For example, 1 degree Celsius is converted to 1 kelvin. For conversions of absolute temperatures, use convert/temperature.
|
•
|
You can modify the properties of the conversion by including options opts. The opts argument can contain one or more of the following equations.
|
|
This option specifies that the resulting unit should be returned in terms of base units, rather than derived units. By default, this option is set to false.
|
|
dimension = true or false
|
|
If this option is given, the third calling sequence is used. This indicates that the given dimension should be converted into the corresponding units of the given system. By default, this option is set to false.
|
|
This option specifies whether annotations to units are ignored. By default, this option is set to false.
|
|
|
Examples
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
| (7) |
>
|
|
The following examples illustrate conversion of an expression which is not a simple product of a quantity and a single unit. For such an expression the conversion may be applied after combining units, or the conversion may be mapped over individual units.
>
|
|
| (8) |
>
|
|
| (9) |
>
|
|
| (10) |
>
|
|
| (11) |
If infolevel is set to a greater integer (possible settings are 1 through 5), more detailed information about the computation method is displayed.
>
|
|
| (12) |
>
|
|
>
|
|
| (13) |
>
|
|
convert/system: "converting to the units poundal"
| |
| (14) |
>
|
|
| (15) |
>
|
|
>
|
|
convert/system: "converting to the units abA*s/g"
| |
| (16) |
>
|
|
| (17) |
>
|
|
| (18) |
>
|
|
| (19) |
|
|
See Also
|
|
convert, convert/dimensions, convert/temperature, infolevel, type/dimension, Units, Units/Index, Units/Natural, Units/Standard, Units[GetSystems], Units[UseSystem], Units[UsingSystem]
|
|