% uses the SGI command `toppm' to convert vidtomem images to ppm images
% matlab on SGIs is located ...     alias m /mas/system/bin/matlab

for k = 1:24
  dis('doing image %d',k)
  eval(sprintf('!toppm v%02d pic%02d.ppm',k,k-1))

  %data=[reshape(R.',1,MN) reshape(G.',1,MN) reshape(B.',1,MN)];
  %disp('for some reason, on SGIs, loadpnm gives blue in first channel')
  %disp('                                        red in second channel')
  %disp('                                        green in third channel')
  %disp('thus writing out in ``gbr'' order (inverse of above ordering)')
  %data=[reshape(G.',1,MN) reshape(B.',1,MN) reshape(R.',1,MN)];
  %eval(sprintf('saveraw(''data%d'',data)',k/2))
end%for

