convert/unit_free - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

convert/unit_free

convert to unit-free form

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

convert(u, unit_free, unit)

Parameters

u

-

expression

unit

-

(optional) name

Description

• 

The convert(u, unit_free) function returns the unit-free component of u. If u is of type unit, then 1 is returned.

• 

The convert(u, unit_free, unit) function returns the unit-free component of u and assigns the unit component of u to unit. If u is of type unit, then 1 is returned. If u is unit-free, then 1 is assigned to unit.

• 

The term unit-free describes a scalar quantity with no (multiplicative) unit attached to it. Conversion to unit-free does not apply directly to any non-scalar Maple object or data structure, which may still have units embedded within it.

Examples

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.

convert100.0,unit_free

100.0

(1)

convert234,unit_free,'unit1'

234

(2)

unit1

1

(3)

exprconvert45sinxfarad,unit_free,'unit2'

expr:=45sinx

(4)

unit2

F

(5)

aexprunit2

a:=45sinxF

(6)

The conversion to unit_free state does not recurse into, or map over, non-scalar objects. Examples illustrating such mapping or effective unit-stripping recursion are shown below.

MVector[row]3gram,5kilogram

M:=3g5kg

(7)

mapconvert,M,unit_free

35

(8)

t∫1s10ssinxmeterⅆx

t:=∫s10ssinxmⅆx

(9)

subsindetst,has_unit,z→convertz,unit_free

∫110sinxⅆx

(10)

subsindetst,specfuncanything,Units:-Unit,1

∫110sinxⅆx

(11)

If a non-scalar object contains a mix of units then it may be desirable to combine the units or convert to a single system, so as to get correct scaling.

exprMrange=3kg..5g

expr:=Mrange=3kg..5g

(12)

subsindetsexpr,has_unit,z→convertcombinez,units,unit_free

Mrange=3..1200

(13)

exprMrange=3kg..5lb

expr:=Mrange=3kg..5lb

(14)

subsindetsexpr,has_unit,z→convertconvertz,'system',FPS,unit_free

Mrange=30000000045359237..5

(15)

See Also

convert

convert,conversion_table

convert,dimensions

convert,units

electric capacitance

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