saving worksheets?

I have a worksheet saved, but if I try to continue where I left off, Maple has forgotten what all the variables mean and what their values were. 

It's not like I have to retype everything - the commands are still there - but I have to press enter about a hundred times to reenforce what the meanings of all the variables were. 

Is there a way to save it in such a way that you don't lose such information?

I would like to be able to save a worksheet -> close it -> then open it up later and for example, plot a graph using the data in the worksheet, without having to redefine all the variables and such.

Is this possible?

"<!--break-->"

 

Tim Vrablik's picture

Re-execute

All of your information is still there and assigned, you just need to re-execute your worksheet.  Just hit the triple exclamation button (!!!) at the top and all of your commands will be re-executed.  You can then cary on with all of your information

acer's picture

save and read

If you don't mind waiting for the entire worksheet to re-execute, then the "!!!" button or top menubar's "Edit"->"Execute"->"Worksheet" actions should suffice.

However, some key parts of a worksheet might take a great deal of time to execute, if heavy computations are involved. And re-execution of the whole worksheet might then be undesirable. Sometimes one would like to be able to change certain values, or plot options, etc, and re-run only some subset of an existing worksheet.

So, there's a distinction, between expensive parts that you don't want to re-execute, and interactive parts that you might like to call once again. Re-executing the entire worksheet doesn't allow for this distinction.

The commands `save` and `anames` can be used to save Maple's "state" (or parts of it). The state can be saved into a file, and then re-read quickly back into a new session with an explicit `read` command. But such state files are distinct from worksheets. The worksheet itself doesn't have the complete state bundled up within it.

The Standard GUI can prompt you about whether to bundle large amounts of plot data (that sit behind the scenes) into a worksheet. That's a bit of an exception to the rule.

Hmm. I wonder whether one could create an auto-opening .mla archive, whose load action reads a .m state file as well as opens a worksheet. Maybe it'd have to rely on -kp or a shared kernel.

acer

Auto-execute

In addition, you can set certain parts of the worksheet to auto-execute when it is opened. In this way, you can specify which commands to run and possibly which to avoid.  Set your cursor somewhere inside the command line and select Format>AutoExecute>Set (or Clear, if you want to revert).  If you turn Markers on (View>Markers) you will notice an icon on the left telling you the auto-execute is set for that command.

- Stephanie

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}