I have a discrete data set with values f(xi,yi)=zi and I would like to interpolate a z value for any given x,y value. Using the TGraph2D->Interpolate() function should do the job but for some values I only get 0 as a return value. Please see the attached files for illustration.
I just had a quick look. I unziped your file. I get the macro power2.c and the directory “data”. I renamed power2.c into power.C because power2.c doesn’t not have any power2() function. Then I ran power.C and I get:
root [0] .x power.C
Looking for data files ...
OK
Reading all data ...
Error: strtok param[0] type mismatch C:\cygwin\home\Olivier\roottest\power.C(105
)
*** Interpreter error recovered ***
root [1]
Some fix was done in 5/12 to avoid the kind of problem shown here: couet.home.cern.ch/couet/root/ht13.html
if the point you use in Interpolate() falls in one of these “hole” you will get 0 as result.
Changing the number of points might help with the root version you are using.