Concatenation of interpolation and decimation doesn't work

1 Ansicht (letzte 30 Tage)
Ahmad ElMoslimany
Ahmad ElMoslimany am 25 Nov. 2019
Beantwortet: Kaashyap Pappu am 28 Nov. 2019
Hello,
I have a simple question, I have a random sequence that I am going to interpolate, process the upsampled version and then decimate. I have observed that matlab functions interp and decimate doesn't work as expected. For instance,
x = randn(1,100);
y = interp(x,4);
z = decimate(y,4);
u = abs(z-x)
I was expecting that u will be zeros but it is not. Anyone can explain this to me?

Antworten (1)

Kaashyap Pappu
Kaashyap Pappu am 28 Nov. 2019
Decimation is the process of downsampling, followed by filtering. The MATLAB function, by default, filters the input sequence using a lowpass Chebyshev Type I IIR filter as mentioned. This filtering alters the values of the sequence, which is why you notice the difference from the expected values.
The main motivation in theory is that decimation preserves the spectrum of the signal. If signal is just downsampled, the spectrum expands in the frequency domain. You can observe this by using the periodogram function. Decimate a sequence using a high ‘n’ order filter as shown in the documentation and observe the spectrum of the original sequence and decimated sequence.
Hope this helps!

Produkte


Version

R2015a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by