New Packages - Maple Help

New Packages in Maple 10

 Maple 10 contains many new packages.
 For information on enhancements and improvements to existing packages, see Enhanced Packages in Maple 10.
 This help page describes the following new packages.

AudioTools Package

 The AudioTools package provides tools for reading and writing WAVE format audio files, and performing basic audio processing operations.
 Examples
 > with(AudioTools):
 ${\mathrm{aud}}{≔}\left[\begin{array}{cc}{"Sample Rate"}& {22050}\\ {"File Format"}& {\mathrm{PCM}}\\ {"File Bit Depth"}& {8}\\ {"Channels"}& {2}\\ {"Samples/Channel"}& {19962}\\ {"Duration"}& {0.90531}{}{s}\end{array}\right]$ (1)
 > attributes(aud);
 ${22050}{,}{8}{,}{1}$ (2)
 > mono := ToMono(aud);
 ${\mathrm{mono}}{≔}\left[\begin{array}{cc}{"Sample Rate"}& {22050}\\ {"File Format"}& {\mathrm{PCM}}\\ {"File Bit Depth"}& {8}\\ {"Channels"}& {1}\\ {"Samples/Channel"}& {19962}\\ {"Duration"}& {0.90531}{}{s}\end{array}\right]$ (3)
 > filtered := Convolution(mono,<1,1,1,1,1,1,1,1,1,1,1,1,1,1,1>);
 ${\mathrm{filtered}}{≔}\left[\begin{array}{cc}{"Sample Rate"}& {22050}\\ {"File Format"}& {\mathrm{PCM}}\\ {"File Bit Depth"}& {8}\\ {"Channels"}& {1}\\ {"Samples/Channel"}& {19976}\\ {"Duration"}& {0.90594}{}{s}\end{array}\right]$ (4)
 > Write("filteredmono.wav",filtered);
 ${20020}$ (5)

DocumentTools Package

 The DocumentTools package is a collection of commands that allow programmatic access to the properties of interactive components, such as buttons or sliders, in a Standard Maple worksheet or document.

ImageTools Package

 The ImageTools package provides tools for reading and writing JPEG, TIFF, and BMP format image files, and performing basic image processing operations.
 Examples
 > with(ImageTools):
  (6)
 > gray := ToGrayscale(img);
  (7)
 > sharper := Convolution(gray,<<0,-1,0>|<-1,6,-1>|<0,-1,0>>);
  (8)
 > Write("sharpgray.jpg",sharper);
 ${53094}$ (9)

IntegrationTools Package

 The IntegrationTools package provides a number of low-level tools for manipulating definite and indefinite integrals.
 Examples
 > with(IntegrationTools):
 > v := Int(f(x), x=a..b);
 ${v}{≔}{{\int }}_{{a}}^{{b}}{f}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}$ (10)
 > GetIntegrand(v);
 ${f}{}\left({x}\right)$ (11)
 > GetVariable(v);
 ${x}$ (12)
 > GetRange(v);
 ${a}{..}{b}$ (13)

PolynomialIdeals Package

 The PolynomialIdeals package provides tools for computing with ideals of commutative polynomials.
 Examples
 > with(PolynomialIdeals):
 > J := ;
 ${J}{≔}⟨{{z}}^{{2}}{+}{x}{+}{y}{-}{1}{,}{{y}}^{{2}}{+}{x}{+}{z}{-}{1}{,}{{x}}^{{2}}{+}{y}{+}{z}{-}{1}⟩$ (14)
 > Simplify(PrimaryDecomposition(J));
 $⟨{x}{,}{y}{,}{-}{1}{+}{z}⟩{,}⟨{x}{,}{z}{,}{y}{-}{1}⟩{,}⟨{-}{1}{+}{x}{+}{y}{,}{-}{1}{+}{x}{+}{z}{,}{{x}}^{{2}}{-}{2}{}{x}{+}{1}⟩{,}⟨{-}{x}{+}{y}{,}{-}{x}{+}{z}{,}{{x}}^{{2}}{+}{2}{}{x}{-}{1}⟩$ (15)
 > Simplify(PrimeDecomposition(J));
 $⟨{y}{,}{z}{,}{x}{-}{1}⟩{,}⟨{-}{x}{+}{y}{,}{-}{x}{+}{z}{,}{{x}}^{{2}}{+}{2}{}{x}{-}{1}⟩{,}⟨{x}{,}{y}{,}{-}{1}{+}{z}⟩{,}⟨{x}{,}{z}{,}{y}{-}{1}⟩$ (16)
 > K := Intersect((16));
 ${K}{≔}⟨{-}{x}{}{y}{+}{y}{}{z}{,}{-}{x}{}{y}{+}{z}{}{x}{,}{{z}}^{{2}}{+}{x}{+}{y}{-}{1}{,}{{y}}^{{2}}{+}{x}{+}{z}{-}{1}{,}{{x}}^{{2}}{+}{y}{+}{z}{-}{1}⟩$ (17)
 ${R}{≔}⟨{-}{x}{}{y}{+}{y}{}{z}{,}{-}{x}{}{y}{+}{z}{}{x}{,}{{z}}^{{2}}{+}{x}{+}{y}{-}{1}{,}{{y}}^{{2}}{+}{x}{+}{z}{-}{1}{,}{{x}}^{{2}}{+}{y}{+}{z}{-}{1}⟩$ (18)
 > K subset R, R subset K;
 ${\mathrm{true}}{,}{\mathrm{true}}$ (19)

ProcessControl Package

 The ProcessControl package provides various tools for statistical process control.
 Examples
 > with(ProcessControl):
 > A:=[12, 8, 6, 9, 10, 12, 11, 16, 10, 6, 20, 15, 9, 8, 6, 8, 10, 7, 5, 8, 5, 8, 10, 6, 9];
 ${A}{≔}\left[{12}{,}{8}{,}{6}{,}{9}{,}{10}{,}{12}{,}{11}{,}{16}{,}{10}{,}{6}{,}{20}{,}{15}{,}{9}{,}{8}{,}{6}{,}{8}{,}{10}{,}{7}{,}{5}{,}{8}{,}{5}{,}{8}{,}{10}{,}{6}{,}{9}\right]$ (20)
 > CChart(A, 100);
 > CControlLimits(A, 100);
 $\left[{0.181764854164603}{,}{18.5382351458354}\right]$ (21)

RegularChains Package

 The RegularChains package provides tools for triangularization and solving systems of polynomial equations, as well as algebraic computations modulo ideals of polynomials. For a detailed overview and tutorial examples, see the RegularChains package overview page.
 Examples
 > with(RegularChains):
 > R := PolynomialRing([x,y,z]):
 > sys := {x^2 + y + z - 1, x + y^2 + z - 1, x + y + z^2 - 1};
 ${\mathrm{sys}}{≔}\left\{{{z}}^{{2}}{+}{x}{+}{y}{-}{1}{,}{{y}}^{{2}}{+}{x}{+}{z}{-}{1}{,}{{x}}^{{2}}{+}{y}{+}{z}{-}{1}\right\}$ (22)
 The Triangularize command splits this system into a union of triangular systems:
 > dec := Triangularize(sys, R):
 > map(Equations, dec, R);
 $\left[\left[{x}{-}{z}{,}{y}{-}{z}{,}{{z}}^{{2}}{+}{2}{}{z}{-}{1}\right]{,}\left[{x}{,}{y}{,}{z}{-}{1}\right]{,}\left[{x}{,}{y}{-}{1}{,}{z}\right]{,}\left[{x}{-}{1}{,}{y}{,}{z}\right]\right]$ (23)
 One of these tools is the automatic detection of cases in the presence of algebraic relations.  In the example below, we compute the inverse of a matrix modulo the set of algebraic relations specified by the regular chain $\mathrm{rc}$:
 > with(MatrixTools): with(ChainTools):
 > rc := Chain([z^3 - 1, z^2-y^2, x-y], Empty(R), R):
 > A := Matrix([[1, y+z], [2, x-z]]);
 ${A}{≔}\left[\begin{array}{cc}{1}& {y}{+}{z}\\ {2}& {x}{-}{z}\end{array}\right]$ (24)
 The ideal generated by the algebraic relations in $\mathrm{rc}$ is reducible. The MatrixInverse command detects that $A$ is not invertible modulo $\mathrm{rc}$. It splits the ideal into four components, such that the matrix is invertible modulo each of these components. Note that the form of the inverse is different for each component:
 > res := MatrixInverse(A, rc, R);
 ${\mathrm{res}}{≔}\left[\left[\left[\left[\begin{array}{cc}{1}& {0}\\ {1}& {-}\frac{{1}}{{2}}\end{array}\right]{,}{\mathrm{regular_chain}}\right]{,}\left[\left[\begin{array}{cc}{1}& {0}\\ {-}{z}{-}{1}& \frac{{z}}{{2}}{+}\frac{{1}}{{2}}\end{array}\right]{,}{\mathrm{regular_chain}}\right]{,}\left[\left[\begin{array}{cc}{0}& \frac{{1}}{{2}}\\ \frac{{1}}{{2}}& {-}\frac{{1}}{{4}}\end{array}\right]{,}{\mathrm{regular_chain}}\right]{,}\left[\left[\begin{array}{cc}{0}& \frac{{1}}{{2}}\\ {-}\frac{{z}}{{2}}{-}\frac{{1}}{{2}}& \frac{{z}}{{4}}{+}\frac{{1}}{{4}}\end{array}\right]{,}{\mathrm{regular_chain}}\right]\right]{,}\left[\right]\right]$ (25)
 Using the Equations command, the generators for a specific component can be displayed:
 > res[1,1,1],Equations(res[1,1,2],R);
 $\left[\begin{array}{cc}{1}& {0}\\ {1}& {-}\frac{{1}}{{2}}\end{array}\right]{,}\left[{x}{+}{1}{,}{y}{+}{1}{,}{z}{-}{1}\right]$ (26)

Statistics Package

 The Statistics package is a collection of functions and interactive tools for mathematical statistics and data analysis.  The package supports a wide range of common statistical tasks such as quantitative and graphical data analysis, symbolic manipulation of random variables, simulation, and curve fitting.  Much of the functionality in the Statistics package is accessible through context menus.
 Below is the list of primary topics. For a more detailed overview of the package, see the Statistics help page.
 • Over 35 continuous and discrete probability distributions, as well as tools for creating new distributions.
 • Tools for creating and manipulating random variables as well as functions for computing their densities, moments, generating functions and other quantities.
 • A wide range of functions for computing descriptive statistics. This includes location, dispersion and shape statistics, moments and cumulants, as well as several data summary and tabulation commands.
 • Statistical plots including box plots, bar charts, histograms, probability plots, and scatterplots.
 • Optimized algorithms for simulating from all supported distributions, as well as tools for creating custom random number generators, and parametric and non-parametric bootstrapping.
 • Tools for fitting linear and nonlinear models to data points and performing regression analysis.
 • Tools for manipulating likelihood functions, maximum likelihood estimation, kernel density estimation, and bootstrapping.
 • Tools for manipulating statistical data. Data smoothing functions including moving averages, exponential smoothing, and linear filters.
 • Common tools for performing hypothesis testing and inference, including several parametric and non-parametric tests.
 Examples
 > with(Statistics):
 > X:= RandomVariable(Poisson(lambda)):
 > ProbabilityFunction(X, 2);
 $\frac{{{\mathrm{\lambda }}}^{{2}}{}{{ⅇ}}^{{-}{\mathrm{\lambda }}}}{{2}}$ (27)
 > Mean(X);
 ${\mathrm{\lambda }}$ (28)
 > ProbabilityPlot(Sample(RandomVariable(Poisson(3)), 200), Poisson(3));
 > Z:=Sample(Normal(0, 1), 10):
 > A:=Array([seq(2+sin(10*Pi*i/15+2*Z[i]), i=1..5)]):
 > B:=Array([seq(2+sin(10*Pi*i/15+3*Z[i]), i=1..5)]):
 > C:=Array([seq(2+sin(10*Pi*i/15+4*Z[i]), i=1..5)]):
 > BarChart([A, B, C]);

Student[VectorCalculus]

 A new package for vector calculus is available in the Student package.
 • The Student[VectorCalculus] package assists with the teaching and learning of the calculus of functions from ${R}^{n}$ to ${R}^{m}$, where $1.  For studying functions from ${R}^{n}$ to $R$, see Student[MultivariateCalculus].
 • Interactive tutors are provided covering the basic concepts, and a range of commands are included that allow exploration of these and other concepts in greater depth.
 • This package can also be used as an introduction to the more broadly based, top-level VectorCalculus package.
 Examples
 > with(Student[VectorCalculus]):
 > CrossProduct( , );
 $\left({b}{}{f}{-}{c}{}{e}\right){{e}}_{{x}}{+}\left({-}{a}{}{f}{+}{c}{}{d}\right){{e}}_{{y}}{+}\left({a}{}{e}{-}{b}{}{d}\right){{e}}_{{z}}$ (29)
 > SetCoordinates(polar[r, theta]);
 ${{\mathrm{polar}}}_{{r}{,}{\mathrm{\theta }}}$ (30)
 > F:=VectorField();
 ${F}{≔}\left({{r}}^{{2}}{}{\mathrm{\theta }}\right){\stackrel{{_}}{{e}}}_{{r}}{+}\left({-}{\mathrm{\theta }}\right){\stackrel{{_}}{{e}}}_{{\mathrm{θ}}}$ (31)
 > simplify(evalVF(F, <1, Pi/2>));
 $\left[\begin{array}{c}\frac{{\mathrm{\pi }}}{{2}}\\ {-}\frac{{\mathrm{\pi }}}{{2}}\end{array}\right]$ (32)

Tolerances

 Using the Tolerances package, you can perform computations with quantities involving tolerances.
 Examples
 > with(Tolerances):
 > a := 2 &+- 0.1;
 ${a}{≔}{\mathrm{2.000}}{}{\mathrm{+-}}{}\left({\mathrm{0.100}}\right)$ (33)
 > b := 3 &+- 0.05;
 ${b}{≔}{\mathrm{3.000}}{}{\mathrm{+-}}{}\left({\mathrm{0.050}}\right)$ (34)
 > a+b;
 ${\mathrm{5.000}}{}{\mathrm{+-}}{}\left({\mathrm{0.150}}\right)$ (35)
 > a^b;
 ${\mathrm{8.127}}{}{\mathrm{+-}}{}\left({\mathrm{1.484}}\right)$ (36)
 > sin(a);
 ${\mathrm{0.905}}{}{\mathrm{+-}}{}\left({\mathrm{0.042}}\right)$ (37)

Typesetting

 The Typesetting package is a command-line interface for controlling Typeset and 2-D equation Parsing options in the Standard Worksheet interface.
 Examples
 > with(Typesetting):
 > Typeset(BesselJ(v, x));
 ${\mathrm{BesselJ}}{}\left({v}{,}{x}\right)$ (38)