 Units - Maple Programming Help

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

Units

 Unit
 return argument as a unit

 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.
 • 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 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}\right):$
 > $3\mathrm{Unit}\left(\frac{'\mathrm{kg}''m'}{{'s'}^{2}}\right)$
 ${3}{}⟦\frac{{\mathrm{kg}}{}{m}}{{{s}}^{{2}}}⟧$ (1)
 > $\mathrm{combine}\left(,'\mathrm{units}'\right)$
 ${3}{}⟦{N}⟧$ (2)
 > $3⟦\frac{'\mathrm{kg}''m'}{{'s'}^{2}}⟧$
 ${3}{}⟦{N}⟧$ (3)
 > $\mathrm{convert}\left(,'\mathrm{units}',\frac{'\mathrm{lb}''\mathrm{ft}'}{{'s'}^{2}}\right)$
 $\frac{{125000000000}}{{5760623099}}{}⟦\frac{{\mathrm{lb}}{}{\mathrm{ft}}}{{{s}}^{{2}}}⟧$ (4)
 > $\mathrm{convert}\left(,'\mathrm{system}','\mathrm{CGS}'\right)$
 ${300000}{}⟦{\mathrm{dyn}}⟧$ (5)