Smooth signal with peaks using nonparametric method
Yout = mslowess(
|Vector of separation-unit values for
a set of signals with peaks. The number of elements in the vector
equals the number of rows in the matrix |
|Matrix of intensity values for a set
of peaks that share the same separation-unit range. Each row corresponds
to a separation-unit value, and each column corresponds to either
a set of signals with peaks or a retention time. The number of rows
equals the number of elements in vector |
Tip: Use the following syntaxes with data from any separation technique that produces signal data, such as spectroscopy, NMR, electrophoresis, chromatography, or mass spectrometry.
raw noisy signal data,
Yout = mslowess(
a locally weighted linear regression (Lowess) method with a default
When the input vector,
mslowess with optional properties
that use property name/property value pairs. You can specify one or
more properties in any order. Each
be enclosed in single quotation marks and is case insensitive. These
property name/property value pairs are as follows:
specifies the order (
of the Lowess smoother. Enter
1 (linear polynomial
fit or Lowess),
2 (quadratic polynomial fit or
0 (equivalent to a weighted local mean
estimator and presumably faster because only a mean computation is
performed instead of a least-squares regression). The default value
Curve Fitting Toolbox™ software also refers to Lowess smoothing
mslowess(..., 'Span', specifies the window size for the smoothing kernel.
1, the window is equal to
of samples independent of the separation-unit vector,
The default value is
10 samples. Higher values
will smooth the signal more at the expense of computation time. If
1, the window size is taken to be a fraction
of the number of points in the data. For example, when
the window size is equal to
0.50% of the number
of points in
mslowess(..., 'Kernel', selects the function specified by
weighting the observed intensities. Samples close to the separation-unit
location being smoothed have the most weight in determining the estimate.
be any of the following character vectors:
'tricubic' (default) —
mslowess(..., 'RobustIterations', specifies the number of iterations (
for a robust fit. If
no robust fit is performed. For robust smoothing, small residual values
at every span are outweighed to improve the new estimate.
iterations are usually adequate, while larger values might be computationally
mslowess(..., 'ShowPlot', plots the smoothed signal over the original signal.
When you call
mslowess without output arguments,
the signals are plotted unless
only the first signal in
ShowPlotValue can also contain
an index to one of the signals in
Load a MAT-file, included with the Bioinformatics Toolbox™ software, that contains some sample data.
Smooth the spectra and draw a figure of the first spectrum with original and smoothed signals.
YS = mslowess(MZ_lo_res,Y_lo_res,'Showplot',true);
Zoom in on a region of the figure to see the difference in the original and smoothed signals.
axis([7350 7550 0.1 1.0])