Hi Chris,
Matlab's resample function that we use filters the data before
downsampling to prevent aliasing so taking that into account my answer
is correct.
Best,
Vladimir
On Mon, Jul 27, 2009 at 9:57 AM, Christophe
Phillips<[log in to unmask]> wrote:
>
> Hello Vladimir and Hamid,
>
> I would rather disagree with Vladimir's answer and say that, the order does
> matter.
> In theory because of the aliasing effect of downsampling, you could well
> ends up with "spurious" signal in the lower part of your downsampled signal
> spectrum.
>
> Example: your original signal is sampled at 800Hz, and you want to
> downsample it at 400Hz, and low pass filter at 150Hz
> Take a signal at 300Hz in your original signal, it's below the 400Hz Nyquist
> frequency, so no problem.
> Keep one sample out of 2, i.e. downsample at 400Hz, then 300Hz>200Hz, the
> new Nyquist frequency. So the orginally 300Hz signal will appear as a 100Hz
> (*) signal. Low pass filtering at 150Hz will not remove this spurious
> signal...
>
> You should thus low pass filter, at least at the new Nyquist frequency (half
> the new sampling rate), your signal before actually downsampling it.
>
> Best,
> Chris
>
> (*) 200Hz - (300Hz-200Hz)
>
> Vladimir Litvak a écrit :
>
> Dear Amir,
>
> In theory there should be no difference. Since after downsampling
> filtering will work faster I'd suggest you downsample first, just
> because of processing speed.
>
> Best,
>
> Vladimir
>
> On Sun, Jul 26, 2009 at 5:18 PM, Amir H Javadi<[log in to unmask]> wrote:
>
>
> Hello everyone
>
> I want to down-sample and filter my data. Which sequence does result a
> better data, down-sampling and then filtering, or filtering and then
> down-sampling?
>
> Have a good time
> Amir
>
>
>
>
>
>
|