bugGNU Octave - Bugs: bug #39574, spline produces incorrect results...

 
 

bug #39574: spline produces incorrect results in the 'complete' situation

Submitted by:  Andreas Stahel <sha1>
Submitted on:  Fri 26 Jul 2013 04:03:57 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Andreas StahelOpen/Closed: Closed
Release: 3.6.4Operating System: GNU/Linux

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)

Fri 16 Aug 2013 07:35:55 PM UTC, comment #7:

Fixed in csape in the current version of the spline package.

Nir Krakauer <nir_krakauer>
Wed 31 Jul 2013 02:11:52 PM UTC, comment #6:

Hello Nir

the spline() command worked for more than 3 points and the patch by marco is only executed with exately 3 points. Thus the situation with more that 3 points remains stable, and correct for sample I used.

Hope this helps

Andreas

Andreas Stahel <sha1>
Wed 31 Jul 2013 02:08:33 PM UTC, comment #5:

I will fix this for csape in the next release of the splines package.

Also, can you test whether the results returned are correct when there are more than three points?

Nir Krakauer <nir_krakauer>
Tue 30 Jul 2013 05:08:10 PM UTC, comment #4:

Hello again

Thank you Marco for the patch. It worked flawless in my small test case!

Andreas

Andreas Stahel <sha1>
Tue 30 Jul 2013 11:10:37 AM UTC, comment #3:

Hi,

I think lines

in spline.m should be replaced by

Marco

Marco Caliari <caliari>
Project Member
Mon 29 Jul 2013 06:47:34 AM UTC, comment #2:

Hello again

enclose (file spline3points.mat) the results by matlab for t and ys.

I hope it helps

Andreas

(file #28685)

Andreas Stahel <sha1>
Sun 28 Jul 2013 02:42:18 PM UTC, comment #1:

Thanks, I'll look into this. Can you post the output Matlab gives?

Nir Krakauer <nir_krakauer>
Fri 26 Jul 2013 04:03:57 PM UTC, original submission:

Dear developers

The two codes code below should produce identical results.
spline() (and csape() from the splines package) fail
if three points and the derivatives at the boundary are supplied.
Matlab produces the expected result

x = linspace(0,pi/2,3); y = sin(x);
t = linspace(0,pi/2);

ys = spline(x,y,t); % is OK
plot(t,ys)
ys = spline(x,[1 y 0],t); % is not OK
plot(t,ys)

Thank you for the good work

Andreas

Andreas Stahel <sha1>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #28685:  spline3points.mat added by sha1 (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Updated the item)
  • -unavailable- added by caliari (Posted a comment)
  • -unavailable- added by nir_krakauer (Posted a comment)
  • -unavailable- added by sha1 (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 17 Oct 2013 09:54:21 PM UTCrik5CategoryOctave Function=>Octave Forge Package
      StatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Mon 29 Jul 2013 06:47:34 AM UTCsha1Attached File-=>Added spline3points.mat, #28685

    Back to the top


    Powered by Savane 3.1-cleanup1