I have been trying to interpolate n = 50 data points (x,y). After I initiate the arrays X[n] and Y[n], I use cubic spline to do the interpolation:
TSpline3 * CuSpl = new TSpline3(“Cubic Spline”, X, Y, n, “b2e2”, 0, 0);
I can easily access the interpolated points by using:
The first derivative using:
CuSpl ->Derivative(); [Not Deriv()]
I also need 2nd derivative which I cannot access.
CuSpl ->Derivative2() does not work.
In fact, root.cern.ch/root/html/ROOT__Mat … lator.html says:
1st derivative should be extracted using ->Deriv() - which does not work in my case…
2nd derivative should be extracted using ->Deriv2()- neither Deriv2() nor Derivative2() works…
Can anyone please tell me what function must be used to get 2nd derivative? Any help will be appreciated.
P.S. I am using ROOT 5.34 in Ubuntu 12.10…