Workspace

Workspace management.

When to use which

Task

Use

Clear all / close all figures / clear command window

ccc()

Clear all variables except a specified list

clear_all_except()

Bundle a function + every file it calls into a folder

packagecode()

Warning

ccc() mutates the caller’s workspace and closes figures. Intended for interactive sessions, not scripts or functions that other code depends on.

Reference