bugGNU Octave - Bugs: bug #41958, signal package: fir2 interpolation...

 
 

bug #41958: signal package: fir2 interpolation incompatible with octave 3.8

Submitted by:  Wilson Guerrero Coltters <wcoltters>
Submitted on:  Tue 25 Mar 2014 05:26:12 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Mike Miller <mtmiller>
Originator Name: Wilson Guerrero ColttersOpen/Closed: Closed
Release: 3.8.0Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 11 Jan 2015 04:54:53 PM UTC, comment #4:

Added tests to ensure fir1 and fir2 continue to work in https://sourceforge.net/p/octave/signal/ci/b90533e5618273fc385024c567ef87fa46414092/

Mike Miller <mtmiller>
Project AdministratorIn charge of this item.
Wed 09 Apr 2014 02:09:17 AM UTC, comment #3:

So the underlying bug that causes this problem has been fixed (bug #41980). This was a 3.8.1 bug that will be fixed in 3.8.2 or 4.0.

I'd like to add some tests to the fir2 function to make sure it works as expected going forward. I'll leave this open as a reminder to add tests to fir2.

Mike Miller <mtmiller>
Project AdministratorIn charge of this item.
Tue 25 Mar 2014 10:55:34 PM UTC, comment #2:

Moreover, I can confirm that this bug affects the signal package under Octave 3.8 but not under 3.6 or earlier. The reason is a change in the interp1 function to no longer allow piecewise linear interpolation of discontinuous functions. A change to fir2 is needed to do essentially what it used to do with interp1 without relying on this now-unsupported feature.

Specifically, something like this

used to give x that was equivalent to

and now no longer does in Octave 3.8.

I am assigning myself to this bug, but please feel free to provide a patch if this is of interest to anyone else.

Mike Miller <mtmiller>
Project AdministratorIn charge of this item.
Tue 25 Mar 2014 06:21:22 PM UTC, comment #1:

Confirmed, retitling to reflect the real problem is in fir2.

The fir1 function is a thin wrapper around the fir2 function, where most of the work is done. The following example calls to fir2 demonstrate the errors from the linked document:

Mike Miller <mtmiller>
Project AdministratorIn charge of this item.
Tue 25 Mar 2014 05:26:12 PM UTC, original submission:

From page

http://www.sharetechnote.com/html/Octave_Matlab_SignalProcessing.html

If you execute the examples, e.g.:

you will get incorrect results compared with the results shown on the page and also compared with results with Matlab.

Only the function with 'low' delivers correct results.

OpenSUSE 12.3
octave 3.8.1-70.1
octave-forge-signal 1.3.0-63.3

Wilson Guerrero Coltters <wcoltters>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by wcoltters (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 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 11 Jan 2015 04:54:53 PM UTCmtmillerStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Fri 28 Mar 2014 01:16:16 AM UTCmtmillerDependencies-=>Depends on bugs #41980
    Tue 25 Mar 2014 10:56:58 PM UTCmtmillerAssigned toNone=>mtmiller
    Tue 25 Mar 2014 10:55:34 PM UTCmtmillerReleaseother=>3.8.0
      Summarysignal package: fir2 function incorrect results for high-pass, band-pass, band-stop filters=>signal package: fir2 interpolation incompatible with octave 3.8
    Tue 25 Mar 2014 06:21:22 PM UTCmtmillerStatusNone=>Confirmed
      Release3.8.1=>other
      Operating SystemGNU/Linux=>Any
      Summaryoctave-forge-signal fir1 function incorrect results=>signal package: fir2 function incorrect results for high-pass, band-pass, band-stop filters

    Back to the top


    Powered by Savane 3.1-cleanup1