bugGNU Octave - Bugs: bug #40825, interp1 "linear" fails...

 
 

bug #40825: interp1 "linear" fails when x has jumps and y is multi-column

Submitted by:  Juan Pablo Carbajal <juanpi>
Submitted on:  Fri 06 Dec 2013 02:07:33 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: juanpiOpen/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Mon 14 Jul 2014 02:58:12 AM UTC, comment #6:

This seems to match the documentation. For the value exactly at 0.2, the interpolated value is right-continuous because the specified X are increasing. Thus, the value is 0. You can switch it by supplying "left" as the final argument in which case the interpolated value will be 1.

Rik <rik5>
Project Administrator
Sun 13 Jul 2014 05:25:12 PM UTC, comment #5:

Using the developer's default branch

Is this correct behavior?

Ben Abbott <bpabbott>
Project Member
Sun 13 Jul 2014 03:26:23 PM UTC, comment #4:

Hi

I've reported a regression in interp1 (bug #42763) which appears to have been caused by a patch that references this bug.

Regards
Robert

Anonymous
Fri 31 Jan 2014 06:37:25 PM UTC, comment #3:

I applied your patch to the stable branch (http://hg.savannah.gnu.org/hgweb/octave/rev/b06675ef40f2). I also updated a bunch of the documentation and verification tests (http://hg.savannah.gnu.org/hgweb/octave/rev/71d1a1450365). Closing report.

Rik <rik5>
Project Administrator
Fri 06 Dec 2013 02:17:40 PM UTC, comment #2:

oops, the patch is incomplete
here amended version.
Sorry

(file #29794)

Juan Pablo Carbajal <juanpi>
Project Member
Fri 06 Dec 2013 02:10:36 PM UTC, comment #1:

A potential patch, please revise.

(file #29793)

Juan Pablo Carbajal <juanpi>
Project Member
Fri 06 Dec 2013 02:07:33 PM UTC, original submission:

Hi,

This is somehow related with this bug
https://savannah.gnu.org/bugs/?func=detailitem&item_id=36732

The problem arises when interp1 fixes the input data due to jumps but mkpp doesn't know about it.

Example

The removal of jumps in lines 246-250 of interp1.m has to be consistent with multi-column inputs.

In the next post I will attach a change that may solve the problem. I am copying the data vector y cause I do not know if forward in the future it is used, I just followed the same policy as for x (copied to xx)

Juan Pablo Carbajal <juanpi>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #29794:  interp1.patch added by juanpi (1KiB - text/x-patch - amended patch)
file #29793:  interp1.patch added by juanpi (1KiB - text/x-patch - path for interp1 when jumps in multicolumn input)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bpabbott (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by rik5
  • -unavailable- added by juanpi (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 31 Jan 2014 06:37:25 PM UTCrik5StatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Thu 30 Jan 2014 06:03:22 PM UTCrik5Carbon-Copy-=>Added bpabbott
    Fri 06 Dec 2013 02:17:40 PM UTCjuanpiAttached File-=>Added interp1.patch, #29794
    Fri 06 Dec 2013 02:10:36 PM UTCjuanpiAttached File-=>Added interp1.patch, #29793

    Back to the top


    Powered by Savane 3.1-cleanup1