gcoll: a pedestrian garbage collector and workspace cleaner
by us
16 Sep 2003
(Updated 01 Oct 2003)
garbage-collects workspace variables into a structure and optionally deletes those floating variable
Download Now
|
Watch this File
|
| File Information |
| Description |
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. |
| MATLAB release |
MATLAB 6.5 (R13)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (2) |
| 18 Sep 2003 |
Urs Schwarz (us)
|
|
|
| 02 Nov 2007 |
yasser essiarab
|
|
|
| Updates |
| 19 Sep 2003 |
changed output formatting, removed a tiny bug.
ver_tag: 18-Sep-2003 16:38:20 |
| 19 Sep 2003 |
update image to represent current formatting |
| 22 Sep 2003 |
added size info to output. ver_tag: 21-Sep-2003 02:49:07 |
| 30 Sep 2003 |
simplified input: all options/workspace_id now can be specified as part of the command string by a leading dash, eg, gcoll('a* -base b* -x'). ver_tag: 30-Sep-2003 09:18:19 |
| 01 Oct 2003 |
added new flag -k (keep). gcoll a* b* -k will remove all variables from specified workspace except those selected. ver_tag: 01-Oct-2003 11:37:26 |
| 01 Oct 2003 |
str matching engine will not reject variations of forbidden tags (global,-file) anymore. ver_tag: 01-Oct-2003 17:55:17 |
|
Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Disclaimer prior to use.
Contact us at files@mathworks.com