Difference between revisions of "Maple/Initialization and Documentation"

From PrattWiki
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Starting the Program==
+
== Introduction ==
[[Maple]] is free to Duke students and resides on the OIT system in the
+
This page has been updated for Maple 2023 as of September of 2023.
same way that MATLAB does.  To start Maple, make sure your terminal is
 
set up to receive graphics and type
 
<source lang=bash>
 
xmaple17 &
 
</source>
 
at the prompt.  Maple will start up.  If not, note that whenever OIT updates Maple, the command may change.  If sometime in the future <code>xmaple17</code> does not seem to work, type <code>xmaple</code> followed by the tab key and UNIX should auto-complete the appropriate command for you.
 
  
Maple may have a window at startup
+
== Starting Your Document ==
containing hints or tips - go ahead and close that window.  There will
+
If you are using Maple to perform calculations and present results, you will likely want to be in Worksheet mode.  When the Maple splash screen comes up, you can pick New Document or New Worksheet; unless you know you want to do otherwise, pick New Worksheet.
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==
 
==Documenting Your Work==
When Maple starts a worksheet, it expects everything to be an input.
+
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 NetID, and any kind of explanation you would like to add, you need to
To document your work with the title of the assignment, your name and
+
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 NetID.  Within the body of the worksheet, you can use paragraphs to clarify or indicate solutions to specific parts of an assignment.
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==
 
==Clearing the Worksheet==
When Maple runs, it "remembers" everything that it has done in the
+
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
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
 
(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
 
>).  At the prompt, type '''restart'''.  When you hit return, if you
Line 37: Line 20:
  
 
==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 folderOnce in the correct folder, delete the contents of the '''File Name''' box and replace them with your file name.
+
If you are running on your own computer, you should be able to navigate to whatever space you want to save the file.   
  
If you are using an [[AFS Course Space]], you will want to set up a symbolic link in your home directory firstThe reason for this is, if you need Maple to get to your AFS space, you can simply put
+
If you are using a Container, you may want to create a folder in the /home/ubuntu/ folder to save your work for a classNote that this folder will last while you have the reservation (typically for the semester) but will disappear when the reservation is done.  '''''Always backup your Container files on Box or somewhere else!'''''
~/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.
+
If you are using Maple on the OIT Linux 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 ==
 
== Questions ==

Latest revision as of 22:54, 27 September 2023

Introduction

This page has been updated for Maple 2023 as of September of 2023.

Starting Your Document

If you are using Maple to perform calculations and present results, you will likely want to be in Worksheet mode. When the Maple splash screen comes up, you can pick New Document or New Worksheet; unless you know you want to do otherwise, pick 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 NetID, 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 NetID. 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

If you are running on your own computer, you should be able to navigate to whatever space you want to save the file.

If you are using a Container, you may want to create a folder in the /home/ubuntu/ folder to save your work for a class. Note that this folder will last while you have the reservation (typically for the semester) but will disappear when the reservation is done. Always backup your Container files on Box or somewhere else!

If you are using Maple on the OIT Linux 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