convert/unit_name
convert units to unit names
Calling Sequence
Parameters
Description
Examples
Compatibility
convert(u, unit_name)
u
-
expression with units
The convert⁡u,unit_name function returns a representation of the unit part of the expression u that can be easily manipulated programmatically.
First this procedure determines the unit of u. Then every unit name or symbol in this unit expression is replaced by the function call Units:−UnitName⁡string form of the full unit name. The unit-free factor, if present, is ignored.
If there are annotations, then the base unit name (including its context, if applicable) is converted to a string; the resulting string is applied, as a function call, to the string form of the annotations.
The recommended way to convert units to a particular system or otherwise control the format of units is to do this before calling convert⁡...,unit_name, using commands such as combine and convert.
The unit-free factor is ignored.
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 unit and then enter the unit.
When you edit a unit, double brackets appear around it.
convert⁡45⁢sin⁡x⁢Unit⁡farad,unit_name
Units:−UnitName⁡farad
You always get the full name (farad), even if you supply only the symbol (F). Prefixes are respected.
convert⁡2⁢Unit⁡uF,unit_name
Units:−UnitName⁡microfarad
Contexts or annotations are also maintained.
convert⁡2⁢Unit⁡milenautical⁡radius,unit_name
Units:−UnitName⁡mile[nautical]⁡radius
In case you would prefer units to be converted to a particular system, it is best to do that before the conversion to unit names.
a≔5.8⁢Unit⁡pound⁢Unit⁡ftUnit⁡s2
a≔5.8s2⁢lb⁢ft
convert⁡a,unit_name
Units:−UnitName⁡pound⁢Units:−UnitName⁡footUnits:−UnitName⁡second2
a1≔combine⁡a,units
a1≔0.8018787354⁢N
convert⁡a1,unit_name
Units:−UnitName⁡newton
a2≔convert⁡a,system,base
a2≔0.8018787354⁢kg⁢ms2
convert⁡a2,unit_name
Units:−UnitName⁡kilogram⁢Units:−UnitName⁡meterUnits:−UnitName⁡second2
The convert/unit_name command was introduced in Maple 17.
For more information on Maple 17 changes, see Updates in Maple 17.
See Also
combine
combine,units
convert
convert,dimensions
convert,system
convert,units
Units
Units/Index
Download Help Document