bugGNU Octave - Bugs: bug #35730, freqz returns incorrectly scaled...

 
 

bug #35730: freqz returns incorrectly scaled magnitude response

Submitted by:  None
Submitted on:  Tue 06 Mar 2012 09:34:30 AM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: InvalidAssigned to: None
Originator Name: Jerry BOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.4.0
Operating System: Mac OS

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 06 Mar 2012 05:18:20 PM UTC, comment #2:

freqz is behaving as documented. The second argument is the denominator of the IIR transfer function, not the number of points to use.

Rik <rik5>
Project Administrator
Tue 06 Mar 2012 10:55:37 AM UTC, comment #1:

From what I can see when I look at the function freqz this use

freqz(h, N);

is completely wrong for what you want.

The second argument is the denominator parameter and you get exactly
what the function is supposed to give in this case.
The third argument is is the number of frequencies.
So what you want is probably freqz(h, 1, N).

Also "help freqz" describes it exactly like that and nothing is broken.

Anonymous
Tue 06 Mar 2012 09:34:30 AM UTC, original submission:

If h is an FIR impulse response, then
freqz(h);
performs as advertised. However,
freqz(h, N);
where N is any number including the default 512 returns incorrect magnitude results. The incorrect result is wrong by a scale factor of 1/N, so that dB plots are low by 20.0 * log10(N). If instead
freqz(h * N, N);
is used, the results are as would be expected if freqz were not broken.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 06 Mar 2012 05:18:20 PM UTCrik5StatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1