Concatenation of interpolation and decimation doesn't work

2 次查看(过去 30 天)
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?

回答(1 个)

Kaashyap Pappu
Kaashyap Pappu 2019-11-28
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!

类别

Help CenterFile Exchange 中查找有关 Multirate Signal Processing 的更多信息

产品


版本

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by