CleanBatches - Delete completed batch jobs from memory. Batches cannot be removed from memory using 'clear' (they are based on Matlab timers, which are kept in memory even after the variables are cleared). This function will take the appropriate steps. This will not affect pending or running batch jobs. USAGE CleanBatches SEE See also StartBatch, GetBatch, BatchInfo, CancelBatch, Store, Recall.
0001 function CleanBatches 0002 0003 %CleanBatches - Delete completed batch jobs from memory. 0004 % 0005 % Batches cannot be removed from memory using 'clear' (they are based on Matlab 0006 % timers, which are kept in memory even after the variables are cleared). This 0007 % function will take the appropriate steps. 0008 % 0009 % This will not affect pending or running batch jobs. 0010 % 0011 % USAGE 0012 % 0013 % CleanBatches 0014 % 0015 % SEE 0016 % 0017 % See also StartBatch, GetBatch, BatchInfo, CancelBatch, Store, Recall. 0018 % 0019 0020 % Copyright (C) 2010-2011 by Michaƫl Zugaro 0021 % 0022 % This program is free software; you can redistribute it and/or modify 0023 % it under the terms of the GNU General Public License as published by 0024 % the Free Software Foundation; either version 3 of the License, or 0025 % (at your option) any later version. 0026 0027 % Check number of parameters 0028 0029 k = input('Make sure you have saved the results before you proceed!\nDo you wish to clean completed batch jobs (y/N)? ','s'); 0030 if isempty(k) || ~strcmp(lower(k(1)),'y'), return; end 0031 0032 delete(timerfindall('Tag','BatchJob','Running','off'));