Skip to content

Decimate

Sambit Paul edited this page Dec 2, 2023 · 5 revisions

Decimate downsamples the input signal after applying an anti-aliasing filter.

The examples provided here use this signal:

$\sin(4\pi t) + \sin(60\pi t)$

Non-Zero Phase Shift

decimate_nzp

The parameters for this filter are as follows:

  • Down Sampling Factor ⇨ 5
  • Sampling Frequency ⇨ 100
Code
int Fs = 100;
int factor = 5;
boolean zero = false;
Decimate d = new Decimate(signal, Fs, zero);
double[] out = d.decimate(factor);

Zero Phase Shift

decimate_zp

The parameters for this filter are as follows:

  • Down Sampling Factor ⇨ 5
  • Sampling Frequency ⇨ 100
Code
int Fs = 100;
int factor = 5;
boolean zero = true;
Decimate d = new Decimate(signal, Fs, zero);
double[] out = d.decimate(factor);
Clone this wiki locally