bugGNU Octave - Bugs: bug #31780, interp1 behaviour differs from...

 
 

bug #31780: interp1 behaviour differs from matlab when using 'spline' option

Submitter:  Richard <crobar>
Submitted:  Sat 04 Dec 2010 01:12:42 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  3 - Low Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.2.3 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 16 Apr 2011 11:22:16 AM UTC, comment #6: 

What is the status of this report, can it be closed now?

I for the default branch I get:

octave:5> x = [1, 2];
octave:6> y = [2, 3];
octave:7> xi = 1.3;
octave:8> interp1(x, y, xi, 'spline')
ans =  2.3000


Kai

Kai Habel <kahacjde>
Group Member
Mon 14 Feb 2011 01:13:11 PM UTC, comment #5: 

I updated and pushed the changeset.

http://hg.savannah.gnu.org/hgweb/octave/rev/07e102029d2a

All tests pass.


Ben Abbott <bpabbott>
Group Member
Mon 14 Feb 2011 08:38:28 AM UTC, comment #4: 

Dear all,

I cannot cleanly apply Ben's patch to 3.4.0, but, a part from that, the patch is fine and in my opinion it should be committed.

Marco

Marco Caliari <caliari>
Group Member
Mon 06 Dec 2010 09:21:58 PM UTC, comment #3: 

I've attached the patch.

(file #22140)

Ben Abbott <bpabbott>
Group Member
Mon 06 Dec 2010 06:33:45 PM UTC, comment #2: 

I'll add Ben to the CC list for this bug in case he still has the patch.  The patch you mention hasn't been committed, or it may have been committed during the time Savannah was hacked, but its not in the Mercurial codebase today (12/6/10) with tip (11313:988d2bd6bacd).

Rik <rik5>
Group administrator
Mon 06 Dec 2010 08:16:09 AM UTC, comment #1: 

It should be fixed in a patch prepared by Ben. I'm not sure it was already committed.

Marco

Marco Caliari <caliari>
Group Member
Sat 04 Dec 2010 01:12:42 PM UTC, original submission:  

When calling inter1 with the 'spline' method when supplying only two input points octave returns an error while matlab returns a linear interpolation, e.g.


x = [1, 2];
y = [2, 3];
xi = 1.3;
interp1(x, y, xi, 'spline')


in octave returns


error: spline: requires at least 3 points


but in matlab R2008a returns


ans =

    2.3


Apologies if this has already been fixed.

Richard <crobar>

 

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

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by kahacjde (Posted a comment)
  • -email is unavailable- added by bpabbott (Updated the item)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by rik5
  • -email is unavailable- added by caliari (Posted a comment)
  • -email is unavailable- added by crobar (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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-04-16 bpabbott StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2011-02-14 bpabbott StatusPatch Submitted Ready For Test
    2010-12-06 bpabbott Attached File- Added changeset.patch, #22140
        StatusConfirmed Patch Submitted
    2010-12-06 rik5 Priority5 - Normal 3 - Low
        StatusNone Confirmed
    2010-12-06 rik5 Item GroupIncorrect Result Feature Request
        Carbon-Copy- Added bpabbott

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code