Example of how the preprocessing code could look like (the user must set the value for the minLevel parameter, all the rest parameters are set to the suggested values):
% 1. Baseline removal
Y_bs = msbaseremove(Y,[0; ones(298,1); 0]);
% 2. Normalization
Y_bs_norm = msslidenorm(MZ, Y_bs, 200);
% 3. Smoothing
Y_bs_norm_sm = mssmooth(Y_bs_norm, 6, 10);
% 4. Peakbin construction
peaks = mspeakdetect(MZ, Y_bs_norm_sm, minLevel, 3);
[P_union, index, P_w]= mspeakunion(peaks);
% 5. Peakbin assembling and quantification
[peakBins, Y_peaks]= mspeakassemble(Y_bs_norm_sm,index,0.80);
Please, notice that this material is provided under no warranty and no responsibility for its use. You can download a zip file with the scripts source from