Units[Converter] - Maple Programming Help

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

Units[Converter]

 GetUnit
 list options of a unit in the Unit Converter

 Calling Sequence GetUnit(unit, opts)

Parameters

 unit - symbol; unit name opts - (optional) equation(s) of the form option=value where option is one of 'display' or 'default'; specify options for the unit

Description

 • The GetUnit(unit) function returns the options to the AddUnit function that recreate the unit.
 • The GetUnit(unit, opts) function returns an expression sequence of equations indicating the values of each option.
 • This procedure accepts symbols and variations in spelling. For example, $\frac{m}{s}$, meters/second, and metre/second represent the same unit in the Unit Converter.

Examples

 > $\mathrm{with}\left(\mathrm{Units}[\mathrm{Converter}]\right):$
 > $\mathrm{GetUnit}\left(\frac{'m'}{'s'}\right)$
 $\frac{{m}}{{s}}{,}{\mathrm{display}}{=}{"meters per second \left(m/s\right)"}{,}{\mathrm{default}}{=}{\mathrm{To}}$ (1)
 > $\mathrm{GetUnit}\left(\frac{'m'}{'s'},'\mathrm{display}'\right)$
 ${\mathrm{display}}{=}{"meters per second \left(m/s\right)"}$ (2)
 > $\mathrm{GetUnit}\left(\frac{'m'}{'s'},'\mathrm{default}'\right)$
 ${\mathrm{default}}{=}{\mathrm{To}}$ (3)
 > $\mathrm{GetUnit}\left(\frac{'\mathrm{Btu}'}{'\mathrm{lb}''\mathrm{degF}'},'\mathrm{default}','\mathrm{display}'\right)$
 ${\mathrm{default}}{=}\left\{{}\right\}{,}{\mathrm{display}}{=}{"British thermal units per pound degree Fahrenheit \left(Btu/\left(lb*Fahrenheit\right)\right)"}$ (4)