Friday, January 6, 2012

Do not Repeat the task

In one of my work, the funny thing happened. The matlab could not save some of the finished task. It might be memory issues or what not... I am not sure. So, I wanted to run the program in such a way that it would not repeat the finished task while still running the new work.
This script does it!
:)


% inDIR is the directory containing the save work
if exist([inDIR],'dir')>0

disp(['not doing ::: ', inDIR])

writeout = ['echo "not doing ::: ', inDIR, '">>notes.txt'];
system(writeout)

% do nothing
else

% do it command here!!
end

No comments: