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

Online Help

All Products    Maple    MapleSim


Units

  

Split

  

split an expression into a unitless part and a unit

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Split(expr)

Split(expr, output = o)

Parameters

expr

-

algebraic expression, typically with units

o

-

the names unit or coefficient, or a list of these names

Description

• 

The Split command splits an expression into a unitless part and a unit.

• 

By default, the command returns both the unitless part and the unit as an expression sequence: first the unitless part, then the unit.

• 

You can use the output option to make Split return only one of the two. If you specify output=unit, only the unit is returned. If you specify output=coefficient, only the unitless part is returned. If you specify output=l, where l is a list of the names unit and coefficient, then Split returns the corresponding values as an expression sequence in the order specified. The default value of the output option is coefficient,unit.

• 

If expr is itself unitless, the unit is 1. If expr is just a unit (that is, a call to the Unit function), the unitless part is 1.

Examples

withUnits:

Automatically loading the Units[Simple] subpackage

expr5Unitm

expr5m

(1)

Splitexpr

5,m

(2)

SplitUnitbarrelbeer

1,bblbeer

(3)

Split17

17,1

(4)

distance17Unitm

distance17m

(5)

speed5Unitkmh

speed5kmh

(6)

durationdistancespeed

duration175000h

(7)

Splitduration

175000,h

(8)

Splitduration,output=coefficient

175000

(9)

Splitduration,output=unit,coefficient

h,175000

(10)

Compatibility

• 

The Units[Split] command was introduced in Maple 2021.

• 

For more information on Maple 2021 changes, see Updates in Maple 2021.

See Also

combine,units

convert,unit_free

Units