www.gusucode.com > bioinfo 案例源码程序 matlab代码 > bioinfo/MaximumIntensityNormalizationExample.m
%% Maximum Intensity Normalization % This example shows how to normalize the ion intensity of every spectrum % from the mass spec data. % Copyright 2015 The MathWorks, Inc. %% % Load a MAT-file, included with the Bioinformatics Toolbox(TM) software, % that contains sample mass spec data, including MZ_lo_res, a vector of m/z % values, and Y_lo_res, a matrix of intensity values. load sample_lo_res %% % Create a subset (four signals) of the data. MZ = MZ_lo_res; Y = Y_lo_res(:,[1 2 5 6]); %% % Normalize the ion intensity of every spectrum to the maximum intensity of % the single highest peak from any of the spectra in the range above 1000 % m/z. Plot the four spectra. Y2 = msnorm(MZ,Y,'QUANTILE', [1 1],'LIMITS',[1000 inf]); plot(MZ, Y2) axis([-1000 20000 -20 105]) xlabel('Mass-charge Ratio') ylabel('Relative Ion Intensities') title('Maximum-Intensity Normalized Spectra')