mspeakunion.m

   
  MSPEAKUNION computes the union over a matrix of boolean peak-points.
  [U,I,W] = MSPEAKUNION(P) takes as input a boolean matrix P with dimensions MZ x Y. The outut matrix U is a boolean column array that shows for each MZ value if that position was detected as a peak in any of the Y spectra. Output column matrix I contains the positions over the MZ original matrix for which the peak union is true. W collects how many times each union-peak was originally found as peak (maximum number is the number of spectra).