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

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 convertu,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:−UnitNamestring 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.

convert45sinxUnitfarad,unit_name

Units:−UnitNamefarad

(1)

You always get the full name (farad), even if you supply only the symbol (F). Prefixes are respected.

convert2UnituF,unit_name

Units:−UnitNamemicrofarad

(2)

Contexts or annotations are also maintained.

convert2Unitmilenauticalradius,unit_name

Units:−UnitNamemile[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.

a5.8UnitpoundUnitftUnits2

a5.8s2lbft

(4)

converta,unit_name

Units:−UnitNamepoundUnits:−UnitNamefootUnits:−UnitNamesecond2

(5)

a1combinea,units

a10.8018787354N

(6)

converta1,unit_name

Units:−UnitNamenewton

(7)

a2converta,system,base

a20.8018787354kgms2

(8)

converta2,unit_name

Units:−UnitNamekilogramUnits:−UnitNamemeterUnits:−UnitNamesecond2

(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