bugGNU Octave - Bugs: bug #56170, [octave forge] (signal) results...

 
 

bug #56170: [octave forge] (signal) results from fir1 differ from Matlab (inaccurate?)

Submitted by:  John W. Eaton <jwe>
Submitted on:  Fri 19 Apr 2019 02:30:42 PM UTC  
 
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Need Info Assigned to:  None
Originator Name:  jwe Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Fri 19 Apr 2019 03:41:45 PM UTC, comment #1: 

Octave's fir1 is currently based on fir2. It converts its arguments into fir2 arguments and normalizes the result.

Maybe we should compare Octave's fir2 against Matlab for these examples and see if that is the underlying problem.

Or maybe the "FIXME: Consider using exact expression (in terms of sinc) for the impulse response rather than relying on fir2" needs to be looked at.

The equivalent calls to fir2 are

fir2 (2048, [0, 100/(48000/2), 100/(48000/2), 1], [1, 1, 0, 0], [], 2, [])
fir2 (2048, [0, 100/48000/2, 100/48000/2, 1], [1, 1, 0, 0], [], 2, [])

Mike Miller <mtmiller>
Project Administrator
Fri 19 Apr 2019 02:30:42 PM UTC, original submission:  

I received a report about differences between the results produced by Matlab and Octave's fir1 functions.  The example given was:

fir1 (2048, 100/(48000/2), 'low')

The result from Matlab is in column 1 of the attached file (fir1-example.dat) and the results I see for Octave are in column 2.  I see a maximum difference of almost 3%

In another case, the difference is larger.  I misinterpreted the original example and asked for confirmation on the maintainers mailing list for the following instead:

fir1 (2048, 100/48000/2, 'low')

The result from Matlab is in column 3 of the data file and the corresponding result from Octave is in column 4.  Here the maximum difference is about 5%

I'm using the development version of Octave and the signal package.  Octave hg id:  64461ccf3039  and signal package hg id:  2adde4d8b905.

John W. Eaton <jwe>
Project Administrator

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #46798:  fir1-example.dat added by jwe (124KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Submitted the item)
  •  

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

    Only project members can vote.

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-04-19 mtmiller StatusNone => Need Info
    2019-04-19 jwe Attached File- => Added fir1-example.dat, #46798

    Back to the top


    Powered by Savane 3.5