Language - Maple Help

Language and System Changes in Maple 10

 Maple 10 includes the following language and system changes.

Sequences

 • You can use the seq command to generate numeric sequences without specifying an index variable.  The one-parameter form is:
 > seq(1..4);
 ${1}{,}{2}{,}{3}{,}{4}$ (1)
 • Also, you can now specify the size of the increment to use with seq.
 > seq(1..4, 1/2);
 ${1}{,}\frac{{3}}{{2}}{,}{2}{,}\frac{{5}}{{2}}{,}{3}{,}\frac{{7}}{{2}}{,}{4}$ (2)
 > seq(f(i), i = 1..4, 1/2);
 ${f}{}\left({1}\right){,}{f}{}\left(\frac{{3}}{{2}}\right){,}{f}{}\left({2}\right){,}{f}{}\left(\frac{{5}}{{2}}\right){,}{f}{}\left({3}\right){,}{f}{}\left(\frac{{7}}{{2}}\right){,}{f}{}\left({4}\right)$ (3)

Improvements to the map Command

 • In Maple 10, the map command supports additional arguments in mappings over procedures that have special evaluation rules.
 > map(eval, [ 1 - x, 2 + x^2, sqrt(x) + 3 ], 'x'=0);
 $\left[{1}{,}{2}{,}{3}\right]$ (4)
 > map(evalf, [ Pi, exp(1) ], 20);
 $\left[{3.1415926535897932385}{,}{2.7182818284590452354}\right]$ (5)
 • Similar to map2, which maps over the second argument, map[n] allows mapping over the nth argument.
 > map[5](+, 1, 1, 1, 1, [ 10, 11, 12 ], 1, 1);
 $\left[{16}{,}{17}{,}{18}\right]$ (6)
 • You can perform map operations using hardware floats.
 > M := LinearAlgebra[RandomMatrix](10^3, outputoptions = [ datatype = float[ 8 ] ]);
  (7)
 > map[evalhf](-, M);
  (8)
 • Mapping over Matrix, Array, and Vector datatypes can be done in-place.
 > M := Matrix([ [ 1, 2 ], [ 3, 4 ] ]);
 ${M}{≔}\left[\begin{array}{cc}{1}& {2}\\ {3}& {4}\end{array}\right]$ (9)
 > map[inplace](*, M, 2);
 $\left[\begin{array}{cc}{2}& {4}\\ {6}& {8}\end{array}\right]$ (10)
 > M[ 1, 1 ];
 ${2}$ (11)

Quick Help for Maple Objects

 • The Describe command generates a brief description for many procedures, modules, and other Maple objects based on information stored in them. This is a quick alternative to reading entire help pages.
 > Describe(Sockets);
 # package for connection oriented TCP/IP sockets module Sockets:     # open a client socket     Open( )     # close a socket connection     Close( )     # test for data availability on a socket     Peek( )     # read text from a socket connection     Read( )     # write text to a socket connection     Write( )     # read a line of text from a socket connection     ReadLine( )     # read binary data from a socket     ReadBinary( )     # write binary data to a socket     WriteBinary( )     # service requests, one at a time     Serve( )     # internet address translation     Address( )     # parse an URL into components     ParseURL( )     # map service names to port numbers     LookupService( )     # retrieve the name of the local host     GetHostName( )     # get the hostname of the local side of a connection     GetLocalHost( )     # get the port number of the local side of a connection     GetLocalPort( )     # get the hostname of the peer of a connection     GetPeerHost( )     # get the port number of the peer of a connection     GetPeerPort( )     # return the process ID     GetProcessID( )     # retrieve data about the local host     HostInfo( )     # determine the status of all open socket connections     Status( )     # configure a socket connection     Configure( )