From: Jeff K on
I am trying to filter some data (essentially a low pass filter) and
was told to use the Parks-McClellan algorithm to determine the
filter. I can get the command

b = firpm( 25, f, a, 'd' )

to work and give me a filter that looks right, but how do I use that
on my data? I have a data vector X which I want to filter using the
output of firpm.

For reference, I'm using

f = [0 0.5 0.6 1];
a = [0 1 0 0];

with a data set X that's 30,000 points. f and a might not be the
correct for filtering out the noise in the data, but I need to be
able to see the filtered response to know that.

I was told to use Parks-McClellan differentiator (and I'd prefer to
do that if possible), but if something will work better, I'm fine
with that, too.
From: Ralph Schmidt on
Jeff K schrieb:
> I am trying to filter some data (essentially a low pass filter) and
> was told to use the Parks-McClellan algorithm to determine the
> filter. I can get the command
>
> b = firpm( 25, f, a, 'd' )
>
> to work and give me a filter that looks right, but how do I use that
> on my data? I have a data vector X which I want to filter using the
> output of firpm.
>
> For reference, I'm using
>
> f = [0 0.5 0.6 1];
> a = [0 1 0 0];
>
> with a data set X that's 30,000 points. f and a might not be the
> correct for filtering out the noise in the data, but I need to be
> able to see the filtered response to know that.
>
> I was told to use Parks-McClellan differentiator (and I'd prefer to
> do that if possible), but if something will work better, I'm fine
> with that, too.

Hello Jeff,

you can use X_filerted = filter(b,1,X) to filter your dataset X.

HTH
Ralph