Get Unit - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

# Online Help

###### All Products    Maple    MapleSim

Units

 GetUnit
 get unit information

 Calling Sequence GetUnit(unit, opt1, opt2, ...)

Parameters

 unit - symbol; unit name opt1, opt2, ... - (optional) options names where opt1, opt2, ... are 'abbreviation', or 'abbreviations', 'context', 'conversion', 'default', 'plural', 'prefix', 'spelling', 'spellings', 'symbol', 'symbols'; specify options of the given unit

Description

 • The GetUnit(unit) function returns the default unit name and an expression sequence of equations for only the options that recreate the unit if given as options to the AddUnit function.
 • The GetUnit(unit, opt1, opt2, ...) function, where each opti is an option name, returns an expression sequence of equations indicating the values of only the opti specified in the calling sequence. For a description of each option, see Units,AddUnit.
 • The GetUnit(unit, 'context') function is a convenient way to determine the default context of unit.

Examples

 > $\mathrm{with}\left(\mathrm{Units}\right):$
 Automatically loading the Units[Simple] subpackage
 > $\mathrm{GetUnit}\left('\mathrm{ounce}\left[\mathrm{avoirdupois}\right]'\right)$
 ${\mathrm{ounce}}{,}{\mathrm{context}}{=}{\mathrm{avoirdupois}}{,}{\mathrm{conversion}}{=}\frac{{45359237}{}{{\mathrm{gram}}}_{{\mathrm{SI}}}}{{1600000}}{,}{\mathrm{prefix}}{=}{\mathrm{none}}{,}{\mathrm{abbreviation}}{=}{\mathrm{none}}{,}{\mathrm{symbol}}{=}{\mathrm{oz}}{,}{\mathrm{symbols}}{=}\left\{{\mathrm{oz}}\right\}{,}{\mathrm{default}}{=}{\mathrm{true}}{,}{\mathrm{abbreviations}}{=}{\varnothing }{,}{\mathrm{spellings}}{=}\left\{{\mathrm{ounce}}{,}{\mathrm{ounces}}\right\}{,}{\mathrm{plural}}{=}{\mathrm{ounces}}{,}{\mathrm{spelling}}{=}{\mathrm{ounce}}$ (1)
 > $\mathrm{GetUnit}\left('\mathrm{ounce}\left[\mathrm{avoirdupois}\right]','\mathrm{default}','\mathrm{symbols}','\mathrm{symbol}'\right)$
 ${\mathrm{ounce}}{,}{\mathrm{default}}{=}{\mathrm{true}}{,}{\mathrm{symbols}}{=}\left\{{\mathrm{oz}}\right\}{,}{\mathrm{symbol}}{=}{\mathrm{oz}}$ (2)
 > $\mathrm{GetUnit}\left('\mathrm{ounce}\left[\mathrm{US_liquid}\right]','\mathrm{default}','\mathrm{symbols}','\mathrm{symbol}'\right)$
 ${\mathrm{ounce}}{,}{\mathrm{default}}{=}{\mathrm{false}}{,}{\mathrm{symbols}}{=}\left\{{\mathrm{oz}}\right\}{,}{\mathrm{symbol}}{=}{\mathrm{oz}}$ (3)
 > $\mathrm{GetUnit}\left('\mathrm{meter}','\mathrm{spellings}','\mathrm{spelling}','\mathrm{plural}'\right)$
 ${\mathrm{meter}}{,}{\mathrm{spellings}}{=}\left\{{\mathrm{meter}}{,}{\mathrm{meters}}{,}{\mathrm{metre}}{,}{\mathrm{metres}}\right\}{,}{\mathrm{spelling}}{=}{\mathrm{meter}}{,}{\mathrm{plural}}{=}{\mathrm{meters}}$ (4)
 > $\mathrm{GetUnit}\left('\mathrm{atmosphere}\left[\mathrm{technical}\right]'\right)$
 ${\mathrm{atmosphere}}{,}{\mathrm{context}}{=}{\mathrm{technical}}{,}{\mathrm{conversion}}{=}\frac{{98066500}{}{{\mathrm{gram}}}_{{\mathrm{SI}}}}{{{\mathrm{metre}}}_{{\mathrm{SI}}}{}{{\mathrm{second}}}_{{\mathrm{SI}}}^{{2}}}{,}{\mathrm{prefix}}{=}{\mathrm{none}}{,}{\mathrm{abbreviation}}{=}{\mathrm{at}}{,}{\mathrm{symbol}}{=}{\mathrm{atm}}{,}{\mathrm{symbols}}{=}\left\{{\mathrm{atm}}{,}{\mathrm{atmos}}\right\}{,}{\mathrm{default}}{=}{\mathrm{false}}{,}{\mathrm{abbreviations}}{=}\left\{{\mathrm{at}}\right\}{,}{\mathrm{spellings}}{=}\left\{{\mathrm{atmosphere}}{,}{\mathrm{atmospheres}}\right\}{,}{\mathrm{plural}}{=}{\mathrm{atmospheres}}{,}{\mathrm{spelling}}{=}{\mathrm{atmosphere}}$ (5)
 > $\mathrm{GetUnit}\left('\mathrm{atmosphere}\left[\mathrm{technical}\right]','\mathrm{symbol}','\mathrm{abbreviation}'\right)$
 ${\mathrm{atmosphere}}{,}{\mathrm{symbol}}{=}{\mathrm{atm}}{,}{\mathrm{abbreviation}}{=}{\mathrm{at}}$ (6)

 See Also