0

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.

questionto42
  • 7,175
  • 4
  • 57
  • 90
  • 1
    Just type `clear`. – Cris Luengo Jan 03 '21 at 16:03
  • 1
    `Edit->Clear Workspace` in the menus should work as well. – beaker Jan 03 '21 at 17:31
  • Sorry for this too easy question. I only thought to find such a command when I just right-clicked inside the workspace. Obviously not my day. – questionto42 Jan 03 '21 at 17:54
  • 1
    There is also a setting in the preferences 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` – Tasos Papastylianou Jan 03 '21 at 19:41

1 Answers1

1

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

questionto42
  • 7,175
  • 4
  • 57
  • 90