bugGNU Octave - Bugs: bug #41386, interp1 fails with discontinuities

 
 

bug #41386: interp1 fails with discontinuities

Submitter:  None
Submitted:  Wed 29 Jan 2014 12:28:33 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Marcin Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.8.0
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 01 Feb 2014 05:10:40 AM UTC, comment #4: 

I did some more checking and I believe it is safe to demote the error back to a warning.  I did so in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/1ad77b3e6bef) and added a %!warning test for the new behavior.  Closing report.

Rik <rik5>
Group administrator
Thu 30 Jan 2014 05:39:33 PM UTC, comment #3: 

I'm adding Ben Abbott to the list since he was the one who wrote the checking code for monotonicity.  It appears to me that it is safe to change the error message on line 210 back to a warning as it was in 3.6.4.

I created two data sets: (x1d, y1d) with one discontinuity at x == 1, and (x3d, y3d) with two discontinuities at x == 1.  When I temporarily disable line 210 and run the interpolations for both 'left' and 'right' I get the same answer regardless of the number of "jumps" at the disconuity point.

I'm attaching tst.var which is an Octave file with the variables needed to run the test.

Sample:


load tst.var
yi_1left = interp1 (x1d, y1d, 'linear', 'left')
yi_3left = interp1 (x3d, y3d, 'linear', 'left')
isequal (yi_1left, yi_3left)


Maybe is bug #40825 is fixed this would somehow change the results.


(file #30422)

Rik <rik5>
Group administrator
Wed 29 Jan 2014 05:02:34 PM UTC, comment #2: 

Script fails with single column y, so it is not bug #40825, although both are similar. I have changed my local version of interp1.m line 210 from error to warning as it was in previous versions and the thing works for me again.

Anonymous
Wed 29 Jan 2014 03:59:12 PM UTC, comment #1: 

Can you upload a simple example that we can use to test the behavior?  Also, is your test case the same or different from bug #40825?


Rik <rik5>
Group administrator
Wed 29 Jan 2014 12:28:33 PM UTC, original submission:  

The script interp1 has changed with the new version 3.8.0. In previous versions discontinuities in data resulted in the warning only. With the new version the script has changed and now it ends with the error message "interp1: extra points in discontinuities". In the previous versions it was warning message only. To my understanding, discountinuities should be allowed with both 'linear' and 'nearest' methods of interpolation accordingly to to the manual.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #30422:  tst.var added by rik5 (501B - application/octet-stream)
file #30415:  3.dat added by None (273KiB - application/x-ns-proxy-autoconfig - sample file with discountinous data and mini script to run)
file #30416:  detrend.m added by None (161B - text/x-objcsrc - sample file with discountinous data and mini script to run)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5
  • -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 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-02-01 rik5 Open/ClosedOpen Closed
    2014-02-01 rik5 StatusNeed Info Fixed
    2014-01-30 rik5 Attached File- Added tst.var, #30422
        Carbon-Copy- Added bpabbott
    2014-01-29 None Attached File- Added 3.dat, #30415
        Attached File- Added detrend.m, #30416
    2014-01-29 rik5 StatusNone Need Info
    2014-01-29 rik5 Item GroupSegfault, Bus Error, etc. Incorrect Result

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code