Resample signal with peaks
[
Xout
, Intensitiesout
]
= msresample(X
, Intensities
, N
)
msresample(..., 'Uniform', UniformValue
,
...)
msresample(..., 'Range', RangeValue
,
...)
msresample(..., 'RangeWarnOff', RangeWarnOffValue
,
...)
msresample(..., 'Missing', MissingValue
,
...)
msresample(..., 'Window', WindowValue
,
...)
msresample(..., 'Cutoff', CutoffValue
,
...)
msresample(..., 'ShowPlot', ShowPlotValue
,
...)
X  Vector of separationunit values for
a set of signals with peaks. The number of elements in the vector
equals the number of rows in the matrix Intensities .
The separation unit can quantify wavelength, frequency, distance,
time, or m/z depending on the instrument that generates the signal
data. 
Intensities  Matrix of intensity values for a set
of peaks that share the same separationunit range. Each row corresponds
to a separationunit 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 X . 
N  Positive integer specifying the total number of samples. 
Tip Use the following syntaxes with data from any separation technique that produces signal data, such as spectroscopy, NMR, electrophoresis, chromatography, or mass spectrometry. 
[
resamples
raw noisy signal data, Xout
, Intensitiesout
]
= msresample(X
, Intensities
, N
)Intensities
. The
output signal has N
samples with a spacing
that increases linearly within the range [min(
. X
)
max(X
)]X
can
be a linear or a quadratic function of its index. When you set input
arguments such that downsampling takes place, msresample
applies
a lowpass filter before resampling to minimize aliasing.
For the antialias filter, msresample
uses
a linearphase FIR filter with a leastsquares error minimization.
The cutoff frequency is set by the largest downsampling ratio when
comparing the same regions in the X
and
Xout
vectors.
Tip

msresample(..., '
calls PropertyName
', PropertyValue
,
...)msresample
with optional properties
that use property name/property value pairs. You can specify one or
more properties in any order. Each PropertyName
must
be enclosed in single quotes and is case insensitive. These property
name/property value pairs are as follows:
, when
msresample(..., 'Uniform', UniformValue
,
...)
is UniformValue
true
,
it forces the vector X
to be uniformly
spaced. The default value is false
.
msresample(..., 'Range',
specifies a RangeValue
,
...)1
by2
vector
with the separationunit range for the output signal, Intensitiesout
. RangeValue
must
be within [min(
].
Default value is the full range X
) max(X
)[min(
. When X
)
max(X
)]RangeValue
values
exceed the values in X
, msresample
extrapolates
the signal with zeros and returns a warning message.
msresample(..., 'RangeWarnOff',
controls the return of a warning message when RangeWarnOffValue
,
...)RangeValue
values
exceed the values in X
. RangeWarnOffValue
can
be true
or false
(default).
msresample(..., 'Missing',
, when MissingValue
,
...)
is MissingValue
true
,
analyzes the input vector, X
, for dropped
samples. The default value is false
. If the downsample
factor is large, checking for dropped samples might not be worth the
extra computing time. Dropped samples can only be recovered if the
original separationunit values follow a linear or a quadratic function
of the X
vector index.
msresample(..., 'Window',
specifies the window used when calculating parameters
for the lowpass filter. Enter WindowValue
,
...)'Flattop'
, 'Blackman'
, 'Hamming
',
or 'Hanning'
. The default value is 'Flattop'
.
msresample(..., 'Cutoff',
specifies the cutoff frequency. Enter a scalar value
from CutoffValue
,
...)0
to 1
(Nyquist frequency
or half the sampling frequency). By default, msresample
estimates
the cutoff value by inspecting the separationunit vectors, X
and XOut
.
However, the cutoff frequency might be underestimated if X
has
anomalies.
msresample(..., 'ShowPlot',
plots the original and the resampled signal. When ShowPlotValue
,
...)msresample
is
called without output arguments, the signals are plotted unless
is ShowPlotValue
false
.
When
is ShowPlotValue
true
,
only the first signal in Intensities
is
plotted.
can
also contain an index to one of the signals in ShowPlotValue
Intensities
.
Tip LC/MS data analysis requires extended amounts of memory from the operating system.
