Re: data resampling (Andreas Widmann )

Subject: Re: data resampling
From:    Andreas Widmann  <widmann@xxxxxxxx>
Date:    Thu, 14 Aug 2014 16:52:23 +0200

Hi Juan, quoting from the MATLAB documentation for resample: "Notice that the last few points of the output y are inaccurate. In its filtering process, resample assumes the samples at times before and after the given samples in x are equal to zero. Your raw data have a DC offset, that is, the above assumption is violated. The antialiasing filter results in DC offset filter artifacts at the beginning and end of the resampled data. If you pad your data with a DC constant (values of the first and last sample, respectively) at the ends and remove the padding after resampling you get much better results. Required number of samples for padding is defined by filter length. See documentation how to compute filter length. Hope this helps! Andreas Am 14.08.2014 um 01:05 schrieb Juan Wu <wujuan22@xxxxxxxx>: > List experts, > > I am attempting to down sample my data from 300 Hz to 1 Hz. I just tried two functions of Matlab: 1) a = resample(Data,1,300); 2) b = downsample(Data,300). The results are quite different between each others. > > <image.png> > > Apparently, the result from "downsampled" is close to the the original data. However, quite a few persons suggested using the re-sampling method - I get this information from google searching, and very agree with this view. Personally I think the downsample method is too simple and very arbitrary. I also do not believe the "Nearest Neighbor" method. I assume that the method resampling takes both "FIR interpolator and decimator" implementation - this is what I expected. Am I right? But now my output from the re-sampling method is really very terrible. So I assume that the resample function from Matlab does not do a good job for this. I am not sure whether I need change to use other softwares or try other functions in the Matlab. > > Any opinions or references are much appreciated. > J

This message came from the mail archive
maintained by:
DAn Ellis <>
Electrical Engineering Dept., Columbia University