upsample function

Increase sample rate

Increase sample rate

Upsample a signal by an integer factor.

upsample(x, n, phase = 0)

Arguments

  • x: input data, specified as a numeric vector or matrix. In case of a vector it represents a single signal; in case of a matrix each column is a signal.
  • n: upsampling factor, specified as a positive integer. The signal is upsampled by inserting n - 1 zeros between samples.
  • phase: offset, specified as a positive integer from 0 to n - 1. Default: 0.

Returns

Upsampled signal, returned as a vector or matrix.

Examples

x <- seq_len(4) u <- upsample(x, 3) u <- upsample(x, 3, 2) x <- matrix(seq_len(6), 3, byrow = TRUE) u <- upsample(x, 3)

See Also

downsample, interp, decimate, resample

Author(s)

Paul Kienzle, pkienzle@users.sf.net .

Conversion to R by Geert van Boxtel, G.J.M.vanBoxtel@gmail.com .

  • Maintainer: Geert van Boxtel
  • License: GPL-3
  • Last published: 2024-09-11