% sci. am. at east campus outdoor table

l1=0    % begin frame
l2=99   % end frame (there are 100 frames numbered 0 to 99)

err_history=[]; p=[];

more off

for l = l1+1:l2   % pairwise of frames l1..l2-1 with l1+1..l2
  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,4,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_4_3_%03d p err_history',l);
  disp(s)
  eval(s)
end%for

