Has Unit - Maple Help

Online Help

All Products    Maple    MapleSim

Units[Converter]

 HasUnit
 test whether a unit is in the Unit Converter

 Calling Sequence HasUnit(unit)

Parameters

 unit - symbol; unit name

Description

 • The HasDimension(unit) function tests whether the given unit is in the Unit Converter.
 • 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}\left[\mathrm{Converter}\right]\right):$
 > $\mathrm{HasUnit}\left(\frac{'m'}{'s'}\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{HasUnit}\left(\frac{'\mathrm{Tm}'}{'s'}\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{HasUnit}\left(\frac{'\mathrm{erg}'}{'s'}\right)$
 ${\mathrm{true}}$ (3)

 See Also