Units[Natural] - Maple Help

Home : Support : Online Help : Science and Engineering : Units : Environments : Natural : Units/Natural/Unit

Units[Natural]

 Unit
 the Unit function in the Natural Units environment

 Calling Sequence Unit(expr) Unit(expr, opt)

Parameters

 expr - algebraic expression opt - (optional) equation of the form preserve = p, determine whether to preserve the input form of the unit, or to convert it to the default system.

Description

 • The Unit(expr) function interprets the argument expr as a unit and returns the result in standard form.
 • In general, it is not necessary to use this function in the Natural Units environment because each expression is tested to determine whether it can be interpreted as a unit. If the strict option is given to Units[UseSystem], in which case only units that are in the specified system are interpreted as units by default, the Unit function can be useful.
 • By default, Maple will initially maintain the unit as you have input it. This behavior can be selected explicitly by supplying the preserve = true option. This can be shortened to just preserve.
 In many situations, Maple combines units in an expression; for example, if you call the combine(..., units) command. Whenever this is the case, Maple will try to convert the unit to the unit system you selected with the UseSystem command (the default is the SI system). If there is no corresponding unit in the selected unit system, Maple will signal an error. You can select this behavior when entering a unit by supplying the preserve = false option.
 If the Units[Natural] package is loaded, then basic arithmetic (such as addition and multiplication) often triggers conversion to the default unit system. In particular, this happens if both of the following conditions hold:
 – The arithmetic operation has to be typed directly by the user, and
 – the arithmetic operation has to involve more than one operand that has a unit attached.
 If you supply the preserve = maybe option when entering a unit, Maple will try to convert the unit you input to your selected unit system. If there is no corresponding unit in the selected unit system, Maple will instead use the unit as entered.
 • You can convert a unit to your default system after the fact by calling combine(..., units) or convert(..., system).

Examples

Note: In Maple 2015 and later versions, units are not surrounded by double brackets.

 > $\mathrm{with}\left(\mathrm{Units}[\mathrm{Natural}]\right):$

In the first example, both $\mathrm{ft}$ and $s$ are interpreted as units, and they are subject to basic arithmetic. This causes the result to be converted to the default unit system.

 > $\frac{3\mathrm{ft}}{s}$
 $\frac{{1143}}{{1250}}{}⟦\frac{{m}}{{s}}⟧$ (1)
 > $\mathrm{Units}[\mathrm{UseSystem}]\left(\mathrm{strict}\right):$

After setting strict use of the default system, $\mathrm{ft}$ is not interpreted as a unit anymore (it is not part of the default SI system).

 > $\frac{3\mathrm{ft}}{s}$
 ${3}{}{\mathrm{ft}}{}⟦\frac{{1}}{{s}}⟧$ (2)

If you want to use the unit $\frac{\mathrm{ft}}{s}$ for one quantity, but generally work with the SI system, you can use the Unit command to achieve this.

 > $3\mathrm{Unit}\left(\frac{\mathrm{ft}}{s}\right)$
 ${3}{}⟦\frac{{\mathrm{ft}}}{{s}}⟧$ (3)