Forums

filter and downsample

Started by egan_nc June 30, 2003
Hi,
I designed a filter using remezord function. When I filtered the
input first and downsampled later, the filter works fine.
out2a=filter(h1,1,out1a);
out2b=downsample(out2a,4);
But when I downsampled first and then fitlered it later the output is
incorrect.
out2a=downsample(out1a,4);
out2b=filter(h1,1,out2a);
Any help is highly appreciated.
Thanks,
EngGan




The result is as expected.

For making things very clear, ask the question why do u do the filtering?

The filtering bandlimits the signal and then u downsample-----> Results
should be OK

When u downsample first there will be folding effect and the resultant
signal is corrupted by the reflection of frequencies outside our bandlimit.
From here on you are dealing with a corrupted signal.

Hope it's clear.

----- Original Message -----
From: "egan_nc" <>
To: <>
Sent: Monday, June 30, 2003 8:09 PM
Subject: [matlab] filter and downsample

> Hi,
> I designed a filter using remezord function. When I filtered the
> input first and downsampled later, the filter works fine.
> out2a=filter(h1,1,out1a);
> out2b=downsample(out2a,4);
> But when I downsampled first and then fitlered it later the output is
> incorrect.
> out2a=downsample(out1a,4);
> out2b=filter(h1,1,out2a);
> Any help is highly appreciated.
> Thanks,
> EngGan > _____________________________________
> Note: If you do a simple "reply" with your email client, only the author
of this message will receive your answer. You need to do a "reply all" if
you want your answer to be distributed to the entire group.
>
> _____________________________________
> About this discussion group:
>
> To Join:
>
> To Post:
>
> To Leave:
>
> Archives: http://www.yahoogroups.com/group/matlab
>
> More DSP-Related Groups: http://www.dsprelated.com/groups.php3
>
> ">http://docs.yahoo.com/info/terms/ >
+++++++++++++++++++++++++++++++ Disclaimer
+++++++++++++++++++++++++++++++++++++++

This e-mail may contain privileged and confidential information and is
intended only for
the use of the specific individual(s) to whom it is addressed. If you
are not an intended
recipient of this e-mail, you are hereby notified that any
unauthorized use, dissemination
or copying of this e-mail or the information contained in it or
attached to it is strictly prohibited.
If you have received this e-mail in error, please delete it and
immediately notify the undersigned
by reply e-mail.
Hellosoft India Pvt. Ltd.
www.hellosoft.com

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Filtering and down sampling are not commutative.

Regards,
Navan --- egan_nc <> wrote:
> Hi,
> I designed a filter using remezord function. When I
> filtered the
> input first and downsampled later, the filter works
> fine.
> out2a=filter(h1,1,out1a);
> out2b=downsample(out2a,4);
> But when I downsampled first and then fitlered it
> later the output is
> incorrect.
> out2a=downsample(out1a,4);
> out2b=filter(h1,1,out2a);
> Any help is highly appreciated.
> Thanks,
> EngGan


__________________________________