Rank: 34798 based on 0 downloads (last 30 days) and 0 file submitted



Personal Profile:


Watch this Author's files


Comments and Ratings by Thorsten
Updated File Comments Rating
30 Jan 2010 keep KEEP is complementary to the "clear" command: it keeps the supplied variables and deletes the rest. Author: David Yang

I used the code by Thomas Deneux, which was really helpful and instructive. However, maybe due to an old MATLAB version, it didn't work for me with many variables to be cleaned.

Modifying the middle block like this worked fine for my, although it's a rather crude fix...

% make a string (separate the variable by a space)
% [varlist{:,2}] = deal(' '); modified
varlist=strcat(varlist, '?');
varlist = varlist';
% varstr = [varlist{:}];
varstr=regexprep([varlist{:}],'?',' '); % modified

Contact us