Signal Toolkit - upfirdn


Loadable Function: y = upfirdn (x, h)
Loadable Function: y = upfirdn (x, h, p)
Loadable Function: y = upfirdn (x, h, p, q)

Upsample, FIR filtering, and downsample.

x is the input and y is the output. The function performs three operations:

  1. Upsample the input x by a factor of p (insert zeros).
  2. FIR filter the upsampled signal with the impulse response h.
  3. Downsample the result by a factor of q (keep every q-th sample).

Other input parameters:

h

FIR filter impulse response, specified as a vector. The filter is applied after upsampling and before downsampling.

p

Upsampling factor, should be a positive integer. p = 1 means no upsampling. Default: 1.

q

Downsampling factor, should be a positive integer. q = 1 means no downsampling. Default: 1.

The FIR filter h should typically be a lowpass filter designed to suppress imaging artifacts (for upsampling) and aliasing (for downsampling).