If I press Ctrl + C
during the execution of a long loop, I lose all the work that has done so far. So is there a way in MATLAB that I can press Ctrl + C
, but return the current variables?
so what I want as a pseudo-code :
for i=1:very_long
do_things();
if keypress(ctrlc_orsomeothercombo)
disp('Im bored!');
return;
end
end
Is this possible?
Thanks