Robert M. Corless
Department of Applied Mathematics
University of Western Ontario
London, Canada

Copyright 2001 by Robert M. Corless
All rights reserved

Useful one-word commands 

Использование монокоманд

Packages in Maple 

Пакеты в Maple

Units

Пакет Units

> restart;
> Digits := 5;

Digits := 5

> width := convert( 27.0, units, pica, cm );

width := 11.387

> convert( 12.0, units, inch, pica );

72.270

> restart;
> with( Units );

> convert(0., temperature, Celsius, kelvin);

273.1500000

> convert( -55., temperature, Celsius, Fahrenheit );

-67.0000000

> convert( -55., temperature, Fahrenheit, Celsius );

-48.3333334

> convert( -40., temperature, Celsius, Fahrenheit );

-40.0000000

> convert( -20., temperature, Celsius, Fahrenheit );

-4.0000000

> convert( 86., temperature, Fahrenheit, Celsius );

30.0000000

> convert( 42., temperature, Celsius, Fahrenheit );

107.6000000

> convert( 165., 'units', 'Hp', 'kW' );

123.0404788

> restart;
> with( Units[Natural] );
Warning, the assigned name polar now has a global binding

Warning, these protected names have been redefined and unprotected: *, +, -, /, <, <=, <>, =, Im, Re, ^, 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, int, ln, log, log10, max, min, normal, root, round, sec, sech, shake, signum, simplify, sin, sinh, sqrt, surd, tan, tanh, trunc, type, verify

> 6*ft + 4.*inches;

1.930400000*Unit(m)

> restart;
> with( Units ):
> convert( 1.0, 'units', 'M', 'km/s' );

.3314600000

> 1/%;

3.016955289

> convert( 1.0, 'units', 'M', 'mi/s' );

.2059596954

> 1/%;

4.855318892

> restart;
> with(Units):
> GetUnit(megatonne);

> restart;
> convert( 1., units, kg, joule, energy=true );

.8987551787e17

> restart;
> with( Units[Natural] ):
> mass := 1.0*kg;

mass := 1.0*Unit(kg)

> c := 3.00e8 * m/s;

c := .300e9*Unit(m/s)

> energy := mass*c^2;

energy := .900000e17*Unit(J)

> 3.*V/V(base);

3.*Unit(V/V(base))

> ln( % );

1.098612289*Unit(Np)

> convert( %, units, dB );

9.542425097*Unit(dB)

a gain of 3 volts is a gain of 10 decibels, e.g.,
> min( 3*m, 10*ft, 3.2*yd);

2.926080000*Unit(m)

> min( 3.*m, 10.*ft, 1.0*x*yd);

min(3.,.9144000000*x)*Unit(m)

> diff( (x^2+3*x+4)*m, x*s );

(2*x+3)*Unit(m/s)

> int( %, x*s=4..7);

42*Unit(m)

> plot( sin(x*degrees), x=0..180 );

> floor( 9.2*s );

9*Unit(s)

> sin((tau*s)*radian/s);

sin(tau)

С официального разрешения                    © 2002 Waterloo Maple, Inc

 
Hosted by uCoz