Maybe I don't fully understand "TSpline" or I misunderstand what you mean.
I tried but still fail. Here is my code:
TGraph *mygra=new TGraph(10,x,y);
TSpline3 *s=new TSpline3("s",mygra);
TF1 *formula=new TF1("formula","s->Eval(x)",1,9);
// TF1 *formula=new TF1(“formula”,“mygra->Eval(x)”,1,9); (<-- still fail)
The error message is :
Error in <TFormula::Compile>: Bad numerical expression : "s.Eval(x)"
Error in <TF1::TF1>: function: formula/s->Eval(x) has 0 parameters instead of 1
I need to calculate a integration whose integrand formed by timing this interpolation
result with another theoretical function(blackbody formula actually). So I need to
transform this discrete data points to a normal and usable function. Or any other
way I can do?
Thank you very much,