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 and then enter the unit.
|
–
|
When you edit a unit, double brackets appear around it.
|
The default setting if none of the Units environments have been loaded is simple.
We can see this because combine/units accepts the following expression, which assumes the unassigned variable has a unit of length.
>
|
|
In either the Units/Standard or Units/Natural model, this expression is invalid. Notice that if we select the standard units mode, executing the same expression results in an error about adding , which is now implicitly unitless, and the term with a unit.
>
|
|
To verify that the correct mode was stored, we can call the UseMode command again.
With the currently selected mode, the default value for the symbolic option of the convert/units command is false. This means, for example, that Maple distinguishes between angles and unitless quantities, and between torque and energy; you cannot convert one to the other.
>
|
|
If we supply the option symbolic = true, or if we switch to the simple mode, then this conversion succeeds, with the implicit understanding that it is the energy required for applying the torque over an angle of one radian.
>
|
|
>
|
|
If we load the Units[Standard] package in a new Maple session to enable the Standard Units environment, the standard mode is automatically selected.
| (8) |
This means that the combine command we used above will throw an error, as before.
>
|
|
You can override the mode by calling UseMode again, or by explicitly supplying the mode option to the combine/units command. In either case, you need to be careful, otherwise the addition operator, +, generates an error before it gets to combine/units. This can be overcome by explicitly using the top level version of + instead of the one from the Units[Standard] package.
>
|
|
Loading the Units package also loads one of the Units subpackages, as indicated by the currently selected mode. By default, this is the Units[Simple] subpackage, but this can be overridden using the UseMode command.
Automatically loading the Units[Simple] subpackage
| |
Automatically loading the Units[Standard] subpackage
| |