unit name - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


convert/unit_name

convert units to unit names

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

convert(u, unit_name)

Parameters

u

-

expression with units

Description

• 

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.

Examples

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

(1)

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

(2)

Contexts or annotations are also maintained.

> 

convert⁡2⁢Unit⁡milenautical⁡radius,unit_name

Units:−UnitName⁡mile[nautical]⁡radius

(3)

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⁢fts2

a≔5.8⁢lb⁢fts2

(4)
> 

convert⁡a,unit_name

Units:−UnitName⁡pound⁢Units:−UnitName⁡footUnits:−UnitName⁡second2

(5)
> 

a1≔combine⁡a,units

a1≔0.8018787354⁢N

(6)
> 

convert⁡a1,unit_name

Units:−UnitName⁡newton

(7)
> 

a2≔convert⁡a,system,base

a2≔0.8018787354⁢m⁢kgs2

(8)
> 

convert⁡a2,unit_name

Units:−UnitName⁡meter⁢Units:−UnitName⁡kilogramUnits:−UnitName⁡second2

(9)

Compatibility

• 

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