Mathematica: NIntegrate data points

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 3K views
Niles
Messages
1,834
Reaction score
0
Hi

I have a set of data points in units of (time, voltage), and they have the form of a Gaussian when I plot it. I would like to normalize my data set, i.e. find a factor C that I multiply on to the voltage-data such that the area is 1.

However, is there a way to numerically integrate data points in Mathematica?


Niles.
 
Physics news on Phys.org
Integration is probably overkill. I would just use:

Apply[Plus,data]

or equivalently:

Plus@@data

If you really want to integrate it then you need to construct an interpolating function object, specify the order of the interpolation and then integrate that. Alternatively, you could fit the data to a Gaussian and then use the integral of the fitted Gaussian.
 
Last edited:
Thanks. Yeah, I think integrating it is overkill. Your first suggestion works!Niles.