Overview of the Units[Natural] Subpackage - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Science and Engineering : Units : Environments : Natural : Units/Natural

Overview of the Units[Natural] Subpackage

 

Basic Functionality

Examples

Basic Functionality

• 

The Units[Natural] subpackage provides an environment that allows users to include units in expressions. The with(Units[Natural]) command establishes an environment in which some functions are modified to accept input with units.

• 

The Natural Units environment provides users with two ways to include units in expressions. The Unit command, *Unit(unit_name), or the natural notation, *unit_name, can be used.

• 

The with(Units[Natural]) command does not allow the use of the short form of the Units package commands that customize the dimensions, units, and systems of units. For that, it is necessary to enter the with(Units) command. For a list of the commands in the Units package, see Units.

Accessing the Natural Units Environment

• 

To include units in an expression or to use a redefined Units[Natural] subpackage command in the current Maple session, enter the with(Units[Natural]) command first.

with(Units[Natural]):

3*cm + 2*Unit('m');

203100m

(1)

Redefined Natural Units Environment Commands

  

The commands redefined in the Natural Units environment to accept input with units are:

*

+

-

/

<

<=

<>

=

>

>=

^

abs

arccos

arccosh

arccot

arccoth

arccsc

arccsch

arcsec

arcsech

arcsin

arcsinh

arctan

arctanh

argument

ceil

collect

combine

conjugate

convert

cos

cosh

cot

coth

csc

csch

csgn

diff

eval

evalc

evalr

exp

expand

factor

floor

frac

Im

int

ln

log

max

min

normal

plot

plot3d

polar

Re

root

round

sec

sech

seq

shake

signum

simplify

sin

sinh

sqrt

surd

tan

tanh

trunc

type

Unit

verify

 

  

To display the help page for a particular command, click the corresponding hyperlink.

• 

For more information on the interaction of these commands, see the Natural Units Example Worksheet.

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.

withUnits&lsqb;Natural&rsqb;&colon;

a_length2&apos;m&apos;

a_length:=2m

(2)

a_width3m

a_width:=3m

(3)

an_areaa_lengtha_width

an_area:=6m2

(4)

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.

3x4ft&plus;4xyyx2ft

3x4&plus;4xyyx2ft

(5)

3x4m&plus;4xyyx2ft

3x4&plus;762625xyyx2m

(6)

You can specify a unit for the differentiating variable in the Units[Natural][diff] function. To do so, multiply the differentiating variable by the unit.

diff&comma;xs

12x3&plus;762625yyx21524625xyyxms

(7)

collect&comma;x

12x3&plus;2286625yx23048625y2x&plus;762625y3ms

(8)

625

7500x3&plus;2286x2y3048xy2&plus;762y3ms

(9)

convert&comma;&apos;units&apos;&comma;&apos;mih&apos;

234375001397x3&plus;5625011yx27500011y2x&plus;1875011y3mih

(10)

eval&comma;x&equals;3&apos;s&apos;&comma;y&equals;4&apos;min&apos;

10012333860s2m

(11)

Although the Natural Units environment provides a natural method of using units, some inputs can be misinterpreted as units. For example, the name f is the symbol for the fresnel, a unit of frequency.  Therefore, fx is interpreted as the fresnel with the modifier or attachment x. To avoid these problems, use the strict option with the UseSystem command. Then only units, including units with prefixes, from the default system of units are accepted in the natural notation. To include units that are not in the default system, use the Unit command.

Units&lsqb;UseSystem&rsqb;&apos;strict&apos;&colon;

3mftx3

3ftx3m

(12)

diff&comma;x

9ftx2m

(13)

3mx3&apos;ft&apos;

11431250x3m2

(14)

diff&comma;x

34291250x2m2

(15)

See Also

convert

Units

Units/frequency

Units/Index

Units/Natural/functions

Units/SI

Units/Standard

Units/Systems

Units[Natural][diff]

Units[UseSystem]

 


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