beamletNum.m 411 B

123456789101112131415161718
  1. function Nbeamlets = beamletNum(folder,Nbatches)
  2. Nbeamlets = 0;
  3. beamletFolder = [folder];
  4. for i=1:Nbatches;
  5. temp = open_beamlet_batch([beamletFolder '/beamletbatch' num2str(i-1) '.bin']);
  6. Nbeamlets = Nbeamlets + length(temp);
  7. disp(int2str(i));
  8. end
  9. fprintf(['Max beamlet number = ' num2str(temp{length(temp)}.num) '\n']);
  10. fprintf(['Number of beamlets = ' num2str(Nbeamlets) '\n']);
  11. end