Dear rootors,
I am trying to read data point from a file then integrate the values around function
data file have ( x and y), x start from 0 to 100 but with different step
and the function I want to integrate is
f=( x*y) dx
So I wrote this script
in.open(“data.dat”);
while (!in.eof())
{
in >>x>>y;
**double f=x*y;
**double sum_f = sum_f+f;
}
cout<<"sum_f = "<<sum_f = <<endl;
may issue is I need to interpolate the values between x, because dx is not constant,
does anyone know the solution??
cheers
Please read tips for efficient and successful posting and posting code
ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided