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

 
 

bug #35730: freqz returns incorrectly scaled magnitude response

Submitter:  None
Submitted:  Tue 06 Mar 2012 09:34:30 AM UTC
   
 
Category:  Libraries Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Jerry B Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.4.0
Operating System:  * Mac OS Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 06 Mar 2018 03:02:45 PM UTC, comment #3: 

I  think this can be closed as works for me.


Doug Stewart <dastew>
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>
Group 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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-03-06 rik5 StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code