# UPSAMPLE

## Purpose:

Inserts zeros between every Nth sample
for FIR upsampling.

## Syntax:

UPSAMPLE(series,
n, offset)

series |
- |
Any series, multi-series table, or expression
resulting in a series or table. |

n |
- |
An integer factor by which to decimate the
series. Inserts N-1 samples between
each sample, increasing the sample rate by a factor of N. Defaults to
1, no rate change. |

offset |
- |
Optional. An integer, the starting offset
for the insertion. Defaults to 0, start
insertion after the first sample. |

## Returns:

A series, the zero inserted series.

## Example:

W1: 1..5

W2: upsample(W1, 2)

W2 == {1, 0, 2, 0, 3, 0, 4, 0, 5}

rate(w1) == 1

rate(w2) == 2

Increases the sample rate of the series
in W1 by a factor of 2 by inserting a zero between every point.

## Example:

W3: 1..5

W4: upsample(W3, 3)

W4 == {1, 0, 0, 2, 0, 0, 3, 0, 0, 4,
0, 0, 5}

rate(w3) == 1

rate(w4) == 3

Increases the sample rate of the series
in W3 by a factor of 3 by inserting 2 zeros between every point.

## Example:

W1: 1..5

W2: upsample(W1, 2, 2)

W2 == {0, 0, 1, 0, 0, 2, 0, 0, 3, 0,
0, 4, 0, 0, 5}

rate(w1) == 1

rate(w2) == 3

Increases the sample rate of the series
in W1 by a factor of 2 by inserting a zero between every point. Two zeros
are prepended to the result.

## Remarks:

UPSAMPLE increases the sample RATE
of the input series by a factor of *N*
by inserting N-1
zeros between each sample. An upsampled series can be interpolated by
filtering the result with a low pass filter with a cut off frequency of
Fs/2
where *Fs* is the original sample
rate.

## See Also:

DECILP

DECIMATE

DOWNSAMPLE

INTERPOLATE

MERGE

REMOVE

RESAMPLE

ZEROS