Hello Micheal,
First see if you can simply use sum instead of intergral. If not then chech the link below plz.
at the end of the page you can finde related similar functions that may also be helpful. Like if you don't have a function of your data and you need to do it numerically, for which you may check
doc trapz
doc cumsum
And so more.
Good Luck!