for i=1:29
  filename = 'coop_basement';
  eval(sprintf('load %s_%05d;',filename,i))

  B=A(1+0:2:480+0,1+3:2:640+3);

  eval(sprintf('saveraw(''%s'',B,''uchar'')',filename))

  dis('wrote frame %05d',i)
  eval(sprintf('!cat %s >> %s_total',filename,filename))
  dis('concatenated frame %05d',i)
end%for

