the Unit function in the Standard Units environment - Maple Help

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

Units[Standard][Unit] - the Unit function in the Standard 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.
 • By default, Maple will 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[Standard] 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

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

The default behavior is to maintain the unit as it was entered.

Notes:

 – To enter a unit in 2-D Math input, select the unit from the appropriate Units palette. If the unit you want is not there, select $\mathrm{unit}$ and then enter the unit.
 – In Maple 2015 and later versions, the double brackets around a unit are not displayed unless you are editing the unit.
 > $3⟦\frac{'\mathrm{ft}'}{'s'}⟧$
 ${3}{}⟦\frac{{\mathrm{ft}}}{{s}}⟧$ (1)

The combine command converts to the default SI system.

 > $\mathrm{combine}\left(,'\mathrm{units}'\right)$
 $\frac{{1143}}{{1250}}{}⟦\frac{{m}}{{s}}⟧$ (2)

By supplying the preserve = false option, you can do this in one step.

 > $3⟦\frac{'\mathrm{ft}'}{'s'}⟧$
 $\frac{{1143}}{{1250}}{}⟦\frac{{m}}{{s}}⟧$ (3)
 > $\mathrm{convert}\left(32.0,'\mathrm{units}',\frac{'\mathrm{ft}'}{'s'},\frac{'\mathrm{km}'}{'h'}\right)$
 ${35.11296000}$ (4)
 > $\mathrm{convert}\left(32.0⟦\frac{'\mathrm{ft}'}{'s'}⟧,'\mathrm{units}',\frac{'\mathrm{km}'}{'h'}\right)$
 ${35.11296000}{}⟦\frac{{\mathrm{km}}}{{h}}⟧$ (5)