No BSD License  

Highlights from
clearbut

Be the first to rate this file! 5 Downloads (last 30 days) File Size: 875 Bytes File ID: #19494

clearbut

by Stefano Pantaleoni

 

08 Apr 2008 (Updated 08 Apr 2008)

Clear all the workspace's variables except for those desired.

| Watch this File

File Information
Description

Clear all the workspace's variables except for those desired.

MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
08 Apr 2008 Duane Hanselman

This functionality has been posted to the FEX many times, e.g., keep, keep2, keep3. This functionality also exists as part of MATLAB itself starting with R2008a, i.e.,

clearvars -except v1 v2 ... clears all variables except for those specified following the -except flag. Use the wildcard character '*' in a variable name to exclude variables that match a pattern from being cleared. clearvars -except X* clears all the variables in the current workspace, except for those that start with X, for instance.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
path Stefano Pantaleoni 22 Oct 2008 09:56:45
directories Stefano Pantaleoni 22 Oct 2008 09:56:45
files Stefano Pantaleoni 22 Oct 2008 09:56:45
clear variables Stefano Pantaleoni 22 Oct 2008 09:56:45
all Stefano Pantaleoni 22 Oct 2008 09:56:45
utilities Stefano Pantaleoni 22 Oct 2008 09:56:45

Contact us at files@mathworks.com