Difference between revisions of "Maple/Initialization and Documentation"

From PrattWiki
Jump to navigation Jump to search
Line 36: Line 36:
 
make sure you have a "fresh start."
 
make sure you have a "fresh start."
  
 +
==Saving Your Work==
 +
On the OIT system, Maple will not always try to save a new document in the same folder as the one where you opened Maple.  Be sure to first check the '''Save In:''' section of the Save dialog box to see where the file is going.  If you need to change directories, you can type the name of the directory in the '''File Name''' box and then hit return - Maple will then show you the contents of that folder.  Once in the correct folder, delete the contents of the '''File Name''' box and replace them with your file name.
  
 +
If you are using an [[AFS Course Space]], you will want to set up a symbolic link in your home directory first.  The reason for this is, if you need Maple to get to your AFS space, you can simply put
 +
~/SHORTCUT
 +
in the '''File Name''' box to get to your AFS folder, where <code>SHORTCUT</code> is the name of the symbolic link from your home directory to your AFS course space.
  
 
== Questions ==
 
== Questions ==

Revision as of 15:11, 14 January 2014

Starting the Program

Maple is free to Duke students and resides on the OIT system in the same way that MATLAB does. To start Maple, make sure your terminal is set up to receive graphics and type

xmaple17 &

at the prompt. Maple will start up. If not, note that whenever OIT updates Maple, the command may change. If sometime in the future xmaple17 does not seem to work, type xmaple followed by the tab key and UNIX should auto-complete the appropriate command for you.

Maple may have a window at startup containing hints or tips - go ahead and close that window. There will most likely be some initial blank document in the main window - go ahead and close it as well by selecting File-Close Document. Then, open a new blank worksheet with File-New-Worksheet Mode.

Documenting Your Work

When Maple starts a worksheet, it expects everything to be an input. To document your work with the title of the assignment, your name and NET ID, and any kind of explanation you would like to add, you need to tell Maple to switch to paragraph mode. Go to Insert-Paragraph-Before Cursor and you will notice that a blank line opens up above the red cursor mark. You can type text in here and Maple will know not to try to process it. You should be sure to use paragraphs to give your worksheet a title, a date, and your name and NET ID. Within the body of the worksheet, you can use paragraphs to clarify or indicate solutions to specific parts of an assignment.

Clearing the Worksheet

When Maple runs, it "remembers" everything that it has done in the worksheet, regardless of what order you ran lines of code. For that reason, it is good programming practice to have Maple "restart" itself at the beginning of each worksheet. To give Maple a command, first tell Maple you are ready to issue commands by selecting Insert-Execution Group-After Cursor. This will start a new bracket (black lines at the left of the worksheet) and give you a prompt (red >). At the prompt, type restart. When you hit return, if you quickly look at the bottom left of the Maple window, you will see that Maple evaluates the command then then tells you that it is Ready. The restart command clears out any variables Maple was taught and also clears out any packages that were loaded. It is a good way to make sure you have a "fresh start."

Saving Your Work

On the OIT system, Maple will not always try to save a new document in the same folder as the one where you opened Maple. Be sure to first check the Save In: section of the Save dialog box to see where the file is going. If you need to change directories, you can type the name of the directory in the File Name box and then hit return - Maple will then show you the contents of that folder. Once in the correct folder, delete the contents of the File Name box and replace them with your file name.

If you are using an AFS Course Space, you will want to set up a symbolic link in your home directory first. The reason for this is, if you need Maple to get to your AFS space, you can simply put

~/SHORTCUT

in the File Name box to get to your AFS folder, where SHORTCUT is the name of the symbolic link from your home directory to your AFS course space.

Questions

Post your questions by editing the discussion page of this article. Edit the page, then scroll to the bottom and add a question by putting in the characters *{{Q}}, followed by your question and finally your signature (with four tildes, i.e. ~~~~). Using the {{Q}} will automatically put the page in the category of pages with questions - other editors hoping to help out can then go to that category page to see where the questions are. See the page for Template:Q for details and examples.

External Links

References