Language - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Language and System Changes in Maple 10

  

Maple 10 includes the following language and system changes.

 

Sequences

Improvements to the map Command

Quick Help for Maple Objects

Programming Updates

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,32,2,52,3,72,4

(2)

seq(f(i), i = 1..4, 1/2);

f1,f32,f2,f52,f3,f72,f4

(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);

1,2,3

(4)

map(evalf, [ Pi, exp(1) ], 20);

3.1415926535897932385,2.7182818284590452354

(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);

16,17,18

(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 ] ]);

M1234

(9)

map[inplace](`*`, M, 2);

2468

(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( )

Programming Updates

• 

For information on updates related to procedures and other aspects of Maple programming, see Programming Facilities Changes in Maple 10.

See Also

Index of New Maple 10 Features

Programming Facilities Changes in Maple 10