Main Content

Resample signal with peaks

`[`

* Xout*,

`Intensitiesout`

`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 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 .
The separation unit can quantify wavelength, frequency, distance,
time, or m/z depending on the instrument that generates the signal
data.`Intensities` |

`Intensities` | 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 . `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`

`X`

`Intensities`

`N`

`Intensities`

`N`

`[min(``X`

)
max(`X`

)]

. `X`

`msresample`

applies
a lowpass filter before resampling to minimize aliasing.For the antialias filter, `msresample`

uses
a linear-phase FIR filter with a least-squares error minimization.
The cutoff frequency is set by the largest down-sampling ratio when
comparing the same regions in the * X* and

`Xout`

**Tip**

`msresample`

is particularly useful when you
have signals with different separation-unit vectors and you want to
match the scales.

`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`

```
msresample(..., 'Uniform',
```

, when * UniformValue*,
...)

`UniformValue`

is `true`

,
it forces the vector `X`

`false`

.`msresample(..., 'Range', `

specifies a * RangeValue*,
...)

`1`

-by-`2`

vector
with the separation-unit range for the output signal, `Intensitiesout`

`RangeValue`

`[min(``X`

) max(`X`

)

].
Default value is the full range `[min(``X`

)
max(`X`

)]

. When `RangeValue`

`X`

`msresample`

extrapolates
the signal with zeros and returns a warning message.`msresample(..., 'RangeWarnOff', `

controls the return of a warning message when * RangeWarnOffValue*,
...)

`RangeValue`

`X`

`RangeWarnOffValue`

`true`

or `false`

(default).`msresample(..., 'Missing', `

, when * MissingValue*,
...)

`MissingValue`

is `true`

,
analyzes the input vector, `X`

`false`

. If the down-sample
factor is large, checking for dropped samples might not be worth the
extra computing time. Dropped samples can only be recovered if the
original separation-unit values follow a linear or a quadratic function
of the `X`

`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 separation-unit vectors, `X`

`XOut`

`X`

`msresample(..., 'ShowPlot', `

plots the original and the resampled signal. When * ShowPlotValue*,
...)

`msresample`

is
called without output arguments, the signals are plotted unless `ShowPlotValue`

is `false`

.
When `ShowPlotValue`

is `true`

,
only the first signal in `Intensities`

`ShowPlotValue`

can
also contain an index to one of the signals in `Intensities`

**Tip**

LC/MS data analysis requires extended amounts of memory from the operating system.

If you receive errors related to memory, try the following:

Increase the virtual memory (swap space) for your operating system as described in Resolve “Out of Memory” Errors.

If you receive errors related to Java

^{®}heap space, increase your Java heap space:If you have MATLAB

^{®}version 7.10 (R2010a) or later, see Java Heap Memory Preferences.If you have MATLAB version 7.9 (R2009b) or earlier, see https://www.mathworks.com/matlabcentral/answers/92813-how-do-i-increase-the-heap-space-for-the-java-vm-in-matlab-6-0-r12-and-later-versions.

`mspalign`

| `msbackadj`

| `msdotplot`

| `msalign`

| `msheatmap`

| `mslowess`

| `msnorm`

| `mspeaks`

| `msresample`

| `msppresample`

| `mssgolay`

| `msviewer`

- Mass Spectrometry and Bioanalytics
- Preprocessing Raw Mass Spectrometry Data
- Visualizing and Preprocessing Hyphenated Mass Spectrometry Data Sets for Metabolite and Protein/Peptide Profiling
- Differential Analysis of Complex Protein and Metabolite Mixtures using Liquid Chromatography/Mass Spectrometry (LC/MS)