Indiana University
University Information Technology Services
  
What are archived documents?
Login>>
Login

Login is for authorized groups (e.g., UITS, OVPIT, and TCC) that need access to specialized Knowledge Base documents. Otherwise, simply use the Knowledge Base without logging in.

Close

In Maple, how do I save variables?

To save all variables in your current Maple session to a file, type the following at the Maple prompt:

save `filename.m`;

Replace filename with the name of the file, keeping the .m extension. Also, be sure to use backquotes rather than single quotes, which are used to delay evaluation. In some fonts, the two look nearly identical.

To save the value of a specific variable in a .m file, type the following at the Maple prompt:

save varname, `filename.m`;

Replace varname with the name of the variable(s), and replace filename with the name of the file.

You cannot edit a .m file, because it is saved in Maple internal format and is not readable by humans. You can, however, save an ASCII file (which can be edited) by saving it without the .m extension. Following are two examples:

save `filename`; save a, b, c, `filename`;

You can then read the file by entering at the Maple prompt:

read `filename`;

Alternatively, you can edit the file with a text editor. You may need to provide the full path to the file. In Mac OS, use the Paste Pathname choice under the Edit menu.

For more information, at the Maple prompt, enter:

?save

For more information about statistical and mathematical software, email the UITS Stat/Math Center, visit the center's web page, or phone 812-855-4724 (IUB) or 317-278-4740 (IUPUI). The center is located in Bloomington at 410 N. Park Avenue, and is open for consultation by appointment Monday-Friday 9am-5pm.

This is document afpn in domain all.
Last modified on October 30, 2009.

Comments/Questions/Corrections

Use this form to offer suggestions, corrections, and additions to the Knowledge Base. We welcome your input!

If you are affiliated with Indiana University and would like assistance with a specific computing problem, please use the Ask a Consultant form, or contact your campus Support Center.

Contact Information

Note: We will reply to your comment at this address. If your message concerns a problem receiving email, please enter an alternate email address.