Decimate - psambit9791/jdsp GitHub Wiki
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
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
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);