Important getting-started information

In this section, we review some fundamental but crucial things about Maple sessions, saving your work, and how to avoid those mysterious things that seem to happen the night before the assignment is due.

One thing to remember is that a good source of information about how to use Maple is the Maple Learning Guide (that comes in the boxes of Maple software) -- especially the material at the beginning.



Maple sessions

A Maple session is the set of commands you type in, responses Maple gives, and the values or expressions that are assigned to variables,
in the order they are typed in.  You start a new session  every time you quit and restart Maple. You can also start a new session without quitting by entering the command restart;
Distinct from the Maple session is your worksheet, which is the set of typed commands and responses, along with text and graphics that you insert, which you see on the screen. The worksheet is what gets saved, and what gets printed out. The values of variables and loaded packages ("
with"s) are not saved  in the worksheet!

When you reload a saved worksheet, Maple doesn't remember the variables you assigned or the packages you loaded (even though all that information is in the worksheet). To get back to where you were, simply hit the "Enter" key repeatedly until all the statements have been executed again. Some statements don't need to be re-executed, like plots that already appear in the worksheet. You can save time by skipping these.

During a Maple session, you can refer to the output of your last (chronological) command with the percent sign %:

>   x:=34/13;

x := 34/13

>   evalf(%);

2.615384615

Saving Worksheets


The first time you save your worksheet, or any time you want to change its name, use "Save As..." from the File menu.  You will notice that the default filename, before you type anything in, is "*.mws" and it is highlighted. It is crucial that you always save files with a name ending in ".mws", like "prob1.mws".  If the ".mws" is left off, Maple will put it in for you.  Later, you can save changes to the worksheet using "Save" from the File menu.

To get back to an old worksheet, start Maple by clicking on the Maple icon, then choose "Open.." from the File menu. To start a new worksheet and session, choose "New" from the File menu.

"Maple doesn't seem to work..."

Sometimes, it seems like Maple is not accepting your commands, or at least is not executing them. There are several things we know of that can cause this:

1.
Don't forget the semicolon ... if you type 2+3 then enter, Maple will warn you that your statement was missing its semicolon -- you can go back at put the semicolon in.

>   2+3

Warning, incomplete statement or missing semicolon


2.
Syntax snafus -- If you are using "for" statements to make lists, or some other kind of programming construction, sometimes you may begin a set of statements (e.g., with a "do" statement) and forget to end it. The simplest, most direct way to get out of this is to type something that you know will cause a syntax error, so Maple will clear its memory and let you start a new statement. The phrase:

>   ;;;od;;

Syntax error, reserved word `od` unexpected

almost always works.

3.
Find that library! -- Some of Maple's specialized commands (for instance, for linear algebra, fancy plotting, statistics, etc) are stored in libraries, and you must tell Maple explicitly to bring these commands into to the memory by using a "with" statement. This is described in the section of this book concerning Maple syntax. If Maple is just parroting your commands, it is likely that you have forgotten to load the appropriate library.

4. We are using Maple 8 -- when the Maple screen comes up at the beginning of your session, it should say Maple 8. If it doesn't you may have an outdated version of Maple on your machine (there are a few floating around). If you discover lab machines with old versions, let us know so we can remedy the situation!


Using Maple Help

There are two kinds of help available on-line in Maple. The first is useful if you know the name of the command you need to use, but have forgotten details of its syntax etc.. The way to use this is to type  ?commandname  at the Maple prompt. For example, to get information on Maple's "tubeplot" command we would type:

>   ?tubeplot


A window will open with information about the tubeplot command.  The most useful information in the window will be the examples at the bottom.


The other way to find help about aspects of Maple is to use the "Help Browser". This is found in "Topic Search" or "Full Text Search" under the "Help" menu.

The help screen for any given Maple command contains more information than anyone could possibly want about the command, often expressed in a somewhat overly technical manner. However, at the end of almost all of the help screens are indispensible sets of examples of the uses of the command. These examples can be copied and pasted into your worksheet and executed, so you can see what the command does. This is a good way to learn about new commands.