Difference between revisions of "Maple/Initialization and Documentation"

From PrattWiki
Jump to navigation Jump to search
Line 42: Line 42:
 
==Saving Your Work==
 
==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.
 
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 22:54, 15 January 2018

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

xmaple &

at the prompt. Maple will start up.

Maple may have a window at startup containing hints or tips - go ahead and close that window. Once you get to the initial screen, there are several options for how to start. Generally, you will want to start a New Worksheet.


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.

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