Changeset 2270
- Timestamp:
- 09/22/09 10:38:57 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/utils/OS/clearall.m
r2245 r2270 1 1 %script that erases all variables except ISSM_DIR 2 list=whos;3 for i=1:length(list),4 if ~strcmpi(list(i).name,'ISSM_DIR'),5 clear(list(i).name);6 end7 end8 clear list;9 clear i;10 2 3 %get all localvariables 4 Lvariables=evalin('base','who'); 5 6 %remove ISSM_DIR from this list 7 Lvariables=Lvariables(find(~strcmp(Lvariables,'ISSM_DIR'))); 8 9 %clear all 10 clear(Lvariables{:},'Lvariables')
Note:
See TracChangeset
for help on using the changeset viewer.