Overview of the Units[Simple] Subpackage
The Units[Simple] subpackage provides an environment that allows users to work with units in their computations. The with(Units[Simple]) command establishes an environment in which some functions, including the ones for basic arithmetic, are modified to accept input with units. By default, the with(Units) command does the same.
Every command in the Simple Units environment that needs to determine whether an expression is valid or not, does so using the Units[TestDimensions] command.
To use the Simple Units environment, enter units using the Unit command, *Unit(unit_name).
In the Simple Units environment, in contrast to the Standard and Natural environments, unassigned variables are not automatically assumed to represent unit-free quantities. For example, 5⁢m+x is a valid expression if x is unassigned, because x may represent a length. On the other hand, 5⁢m+x⁢6⁢s+x is an invalid expression, because the first factor implies that x represents a length, whereas the second factor implies that x is a duration.
In the Simple Units environment, any verifications of valid dimensions ignore so-called Unit annotations. As a consequence, for example, you can add angles to unit-free quantities.
When using the Units[Simple] package, units will by default be converted to your selected unit system. (The default system is SI, the metric system.) To change the default system of units, use the UseSystem command.
The with(Units[Simple]) command does not allow the use of the short form of the Units package commands that customize the dimensions, units, and systems of units. In order to do that, it is necessary to enter the with(Units) command (which, by default, also loads the Units[Simple] package). For a list of the commands in the Units package, see Units.
Accessing the Simple Units Environment
To include units in an expression or to use a redefined Units[Simple] subpackage command in the current Maple session, enter the with(Units[Simple]) command first. Alternatively, you can enter the with(Units) command: this loads the Units package and then the subpackage corresponding to the currently selected mode (using the Units[UseMode] command). The default mode is simple, corresponding to the Units[Simple] subpackage.
Note: Prior to Maple 2015, units were displayed surrounded by double brackets.
3*Unit('cm') + 2*Unit('m');
Redefined Simple Units Environment Commands
The commands redefined in the Simple Units environment to accept input with units are:
To display the help page for a particular command, click the corresponding hyperlink.
For more information on the interaction of these commands, see the Simple Units Example Worksheet.
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.
If an input has only one unit, the output uses that unit. If an input has more than one unit, the output is automatically converted to the default unit in the current system of units. The default system of units in the Units package is SI. To change the default system of units, use the UseSystem command.
The following example uses the fact that the Simple Units environment doesn't assume that unassigned variables are unit-free.
Let x1 and x2 be the positions of the front and rear of an 80.6 meters long train car, as a function of time.
Then the velocity of the front and back of the train car are always the same.
The Units[Simple] subpackage was introduced in Maple 2017.
For more information on Maple 2017 changes, see Updates in Maple 2017.
Download Help Document
What kind of issue would you like to report? (Optional)