about the built-in matlab function decimate
이전 댓글 표시
In the matlab function 'decimate', the input signal is firstly lowpass-filtered, then downsampled.
In the code, I found that
odata = filtfilt(b,a,idata);
nbeg = r - (r*nout - nd);
odata = odata(nbeg:r:nd);
So, after the lowpass, the downsampling selects points from 'nbeg' rather than the first point, giving rise to a shift in the decimated signal. Why?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!