% est_pairwise_cont: continuation after crash % set l1 to last valid file (go one back just to be sure in case crash % was during write of last .mat file) l1=73 % begin frame dis('last valid file set to %03d',l1); l2=172 % end frame (there are 173 frames numbered 0 to 172) dis('loading parameters_pairwisem_5_3_%03d',l1) load parameters_pairwisem_5_3_073 for l = l1+1:l2 % pairwise of frames l1..l2-1 with l1+1..l2 %e.g. if l1=73, then it would be ``for l = 74:l2'' to continue after crash A = eval(sprintf('loadframe(%d)',l-1)); figure(1); % keep from running out of memory (limit fig use) B = eval(sprintf('loadframe(%d)',l)); disp(sprintf('--- estimating translation frame 0 to %d',l)) p_trans=est_trans_fft2(A,B); % now takes B to A p_now=est_pchirp2m(A,B,5,3,p_trans,1); p=[p;p_now]; % concatenate each time mse=mean2nan(abs(A-pchirp2(p_now,B))); err_history=[err_history;mse]; s = sprintf('save parameters_pairwisem_5_3_%03d p err_history',l); disp(s) eval(s) end%for