BUG or FEATURE in Interpolation[] ?
- To: mathgroup at smc.vnet.net
- Subject: [mg4597] BUG or FEATURE in Interpolation[] ?
- From: Stefan Schulz <sschulz at chemie.fu-berlin.de>
- Date: Wed, 21 Aug 1996 03:25:18 -0400
- Sender: owner-wri-mathgroup at wolfram.com
Dear Mathematica users, when I typed in the following lines: xdata = {-1., -0.5, 0., 1., 3., 6., 9.}; ydata = Map[(Exp[-#]-1)^2&, xdata]; data = Inner[List,xdata,ydata,List]; int = Interpolation[data]; Plot[int[x], {x,-1,9}] I found to my surprise, that the function returned by Interpolation is not smooth at some of the data points! For this reason I resorted to write a package Spline1D which returns a smooth cubic spline as a pure function, but is naturally slower than the built-in Interpolation command. Did I find a bug or is this a feature? If it is a feature it certainly makes the Interpolation command not suitable to obtain smooth curves. I would appreciate your comments an this. Many Thanks in advance. Regards, Stefan =-=-=-=-this message is transmitted on 100 % recycled electrons-=-=-=-= | | | | sschulz at chemie.fu-berlin.de | Stefan Schulz | | Tel. ++49/30/838 5384 | FU Berlin - Theoretical Chemistry | | ++49/30/838 2351 | Takustrasse 3 | | FAX. ++49/30/838 4792 | D-14195 Berlin | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ==== [MESSAGE SEPARATOR] ====