Split - Maple Help

Units

 Split
 split an expression into a unitless part and a unit

 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 $\mathrm{output}=\mathrm{unit}$, only the unit is returned. If you specify $\mathrm{output}=\mathrm{coefficient}$, only the unitless part is returned. If you specify $\mathrm{output}=l$, where $l$ is a list of the names $\mathrm{unit}$ and $\mathrm{coefficient}$, then Split returns the corresponding values as an expression sequence in the order specified. The default value of the $\mathrm{output}$ option is $\left[\mathrm{coefficient},\mathrm{unit}\right]$.
 • 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

 > $\mathrm{with}\left(\mathrm{Units}\right):$
 > $\mathrm{expr}≔5⟦m⟧$
 ${\mathrm{expr}}{≔}{5}{}⟦{m}⟧$ (1)
 > $\mathrm{Split}\left(\mathrm{expr}\right)$
 ${5}{,}⟦{m}⟧$ (2)
 > $\mathrm{Split}\left(⟦{\mathrm{barrel}}_{\mathrm{beer}}⟧\right)$
 ${1}{,}⟦{{\mathrm{bbl}}}_{{\mathrm{beer}}}⟧$ (3)
 > $\mathrm{Split}\left(17\right)$
 ${17}{,}{1}$ (4)
 > $\mathrm{distance}≔17⟦m⟧$
 ${\mathrm{distance}}{≔}{17}{}⟦{m}⟧$ (5)
 > $\mathrm{speed}≔5⟦\frac{\mathrm{km}}{h}⟧$
 ${\mathrm{speed}}{≔}{5}{}⟦\frac{{\mathrm{km}}}{{h}}⟧$ (6)
 > $\mathrm{duration}≔\frac{\mathrm{distance}}{\mathrm{speed}}$
 ${\mathrm{duration}}{≔}\frac{{306}}{{25}}{}⟦{s}⟧$ (7)
 > $\mathrm{Split}\left(\mathrm{duration}\right)$
 $\frac{{306}}{{25}}{,}⟦{s}⟧$ (8)
 > $\mathrm{Split}\left(\mathrm{duration},\mathrm{output}=\mathrm{coefficient}\right)$
 $\frac{{306}}{{25}}$ (9)
 > $\mathrm{Split}\left(\mathrm{duration},\mathrm{output}=\left[\mathrm{unit},\mathrm{coefficient}\right]\right)$
 $⟦{s}⟧{,}\frac{{306}}{{25}}$ (10)

Compatibility

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