gcoll: a pedestrian garbage collector and workspace cleaner
this little routine is a garbage collector that helps to clean up a messy workspace.
it collects those numerous variables (or selected members of them) either from the base's or caller's workspace into a handy structure, where each fieldname represents a variable with its contents set to the variable's value.
optionally, it will remove the variable after(!) assignment -or- keep only those that are selected.
when called within a function with the option
s=gcoll('-caller');
it collects all current variables used within that function; other options and/or patterns apply.
look at the accompanying image and type
help gcoll
at the command prompt for more insights.
Cite As
us (2026). gcoll: a pedestrian garbage collector and workspace cleaner (https://se.mathworks.com/matlabcentral/fileexchange/3967-gcoll-a-pedestrian-garbage-collector-and-workspace-cleaner), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 | str matching engine will not reject variations of forbidden tags (global,-file) anymore. ver_tag: 01-Oct-2003 17:55:17 |
