The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: "Simple" filter design wrong answer
Replies: 1   Last Post: Sep 17, 1996 11:25 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Dan Babitch

Posts: 3
Registered: 12/7/04
"Simple" filter design wrong answer
Posted: Sep 15, 1996 1:25 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Here is a little problem that should work but does not. I'm using the Signal
Processing Toolbox 3 on Matlab 4.2c. I tell it to design a second order FIR
notch filter and display the frequency domain transfer function:

b=fir1(2,[.49 .51],'stop');

The correct answer is b = [.5 0 .5], (this really is a notch at 1/2)but the
output of fir1 is completely wrong. If I use n=4 or more it always works
fine. If I try making the points farther apart, such as .25 and .75, it still
fails. If I try fir2 with many different appropriate choices of line
segments, it still always fails for n=2 and always works for n=4 or more.
If I run a firls design it also always fails for n=2 and always works for
n=4 or more.

If I ask for the notch to be some other frequency, I get the same problem.
There are no warnings or errors.

This is very strange. I feel I must be doing something terribly obvious

Does anyone have any suggestions? I am a somewhat experienced user. I
never had this kind of results before, but I guess I never told it to do just
this problem before. I've never been this old before, either.

Thanks for your help.
Dan Babitch

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.