www.gusucode.com > bioinfo 案例源码程序 matlab代码 > bioinfo/SmoothMassSpectrometryDataExample.m
%% Smooth Mass Spectrometry Data % This example shows how to smooth mass spectrometry data using % least-squares polynomial approach. % Copyright 2015 The MathWorks, Inc. %% % Load a MAT-file, included with Bioinformatics Toolbox(TM), that contains % mass spectrometry data including |MZ_lo_res| , a vector of m/z values for a % set of spectra, and |Y_lo_res| , a matrix of intensity values for a set of % mass spectra that share the same m/z charge. load sample_lo_res %% % Apply least-squares polynomial smoothing to the data. YS = mssgolay(MZ_lo_res, Y_lo_res); %% % Plot the third sample/spectrogram in |Y_lo_res| , and its smoothed signal. mssgolay(MZ_lo_res,Y_lo_res,'SHOWPLOT',3);