convert units to unit names - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Science and Engineering : Units : Conversions : convert/unit_name

convert/unit_name - convert units to unit names

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.

– 

In Maple 2015 and later versions, the double brackets around a unit are not displayed unless you are editing the unit.

convert45sinxfarad,'unit_name'

Units:-UnitNamefarad

(1)

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

convert2uF,'unit_name'

Units:-UnitNamemicrofarad

(2)

Contexts or annotations are also maintained.

convert2milenauticalradius,'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.

a:=5.8poundfts2

a:=5.8lbfts2

(4)

converta,'unit_name'

Units:-UnitNamepoundUnits:-UnitNamefootUnits:-UnitNamesecond2

(5)

a1:=combinea,'units'

a1:=0.8018787354N

(6)

converta1,'unit_name'

Units:-UnitNamenewton

(7)

a2:=converta,'system','base'

a2:=0.8018787354kgms2

(8)

converta2,'unit_name'

Units:-UnitNamekilogramUnits:-UnitNamemeterUnits:-UnitNamesecond2

(9)

See Also

combine, combine,units, convert, convert,dimensions, convert,system, convert,units, Units, Units/Index


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam