a bug report

Paweł Wlaź pwlaz at mat.pol.lublin.pl
Sat Oct 25 09:24:24 CDT 2008


Hi,

I have noticed a (in my opinion bug) in spline interpolation. If 
x-coords of the interpolated points is not evenly spaced, the spline 
obtainded is certainly *not* a spline - first derrivative is not 
continuous.

I have tested it in two versions under linux system (3.0.2 and 3.0.3, 
both compiled by me, but without any modification, only plain 
./configure; make; make intall; both downloaded from www.octave.org) 
and under windows xp system (3.0.1 from Octave Forge, a link in 
download section on www.octave.org).

A complete file test_spline.m is in the attachement. This file, when 
run from octave (or you may just

octave test_spline.m

from your shell)
will produce the file spline.png, which shows the problem.

The file spline.png, as obtained here, is also attached.

Sincerely yours,

Pawel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spline.png
Type: application/octet-stream
Size: 3779 bytes
Desc: 
Url : https://www-old.cae.wisc.edu/pipermail/bug-octave/attachments/20081025/b892a555/attachment.obj 
-------------- next part --------------
X=[0,1,10]';
Y=[0,1,0]';
XI=linspace(0,10,100)';
YI=interp1(X,Y,XI,'spline');
plot(XI,YI,X,Y,'o','linewidth',10);
print('spline.png');


More information about the Bug-octave mailing list