octaveoctave-gui

Octave (GUI): Clear all variables of the work environment in one go


GNU Octave, Version 6.1.0, using the GUI:

Is there a way to clear all variables that are listed in the work environment without restarting Octave and without clicking and clearing every single variable?

This is needed for a cold start when switching to a new task, when you still want to keep opened the already opened files.


Solution

  • Taken from the helpful comments, here are the ways to choose from:

    1. Type "clear" in the editor.

    2. Edit->Clear Workspace in the menu.

    3. Not recommended of course, but possible: you could also just close the GUI and open it again. Then, you should at best use the setting to re-open tabs from the previous session when you close the GUI and open it again. See Edit -> Preferences -> Editor -> File-Handling -> Restore Editor Tabs from previous session on startup or when editor is shown again after closing