From octave-sources-request at bevo dot che dot wisc dot edu Tue Aug 29 04:03:27 2000 Subject: Patch to spline.m in matcompat package From: Trond Varslot To: Paul Kienzle cc: help-octave at bevo dot che dot wisc dot edu, octave-sources@bevo.che.wisc.edu Date: Mon, 28 Aug 2000 20:25:21 +0200 (CEST) Hello, You have compiled an extensive package of compatibility functions. I use it a lot, and fint it very useful. I when I tried to use the function spline, however, it did not seem to react very well to computing the value of a function in only 1 point (not in only a few even. You might try this out: x = 0:10; y = sin(x);xspline = 5.5; yspline = spline(x,y,xspline) This is useful when computing a function based on tabular values. I bellieve the following patch to spline.m should solve the problem, though you might have a more elegant solution: 75c75,76 < h = x(idx+1) - x(idx); --- > h=x; > h(idx) = x(idx+1) - x(idx); Yours sincerely Trond Varslot ----------------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.che.wisc.edu/octave/octave.html How to fund new projects: http://www.che.wisc.edu/octave/funding.html Subscription information: http://www.che.wisc.edu/octave/archive.html -----------------------------------------------------------------------