mspeakassemble.m

   
  MSPEAKASSEMBLE converges detected peaks over different spectra into uncorrelated peak bins.
  [P_b, Y_b] = MSPEAKASSEMBLE(Y,I,CORR) forward clusters the peaks pointed out in the matrix I into peak bins if the peak's values among all the Y spectra show a linear correlation bigger or equal than CORR. The assembling process is repeated with the new peak bins until all bins have a linear correlation below the threshold. The output matrix P_b shows, for each row, the start and end index of each peak bin. If the start and end indices are the same implies that there is no peak bin but a single peak point.
  The Y_b vector column gathers, for each created peak bin, the maximum intensity of each one for each spectrum in Y. This criterion was proven to be the most appropriate way to estimate intensity levels in peak detection processes (see Prados et al., 2006 for more detail).