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.
Taken from the helpful comments, here are the ways to choose from:
Type "clear" in the editor.
Edit->Clear Workspace
in the menu.
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