I have the file data.txt with two columns and N rows, something like this:
data.txt
0.009943796 0.4667975 0.009795735 0.46777886 0.009623984 0.46897832 0
Source: Link
An example in MATLAB to help you get your answer ...
x=[3 10 15 20 25 30]; y=[27 14.5 9.4 6.7 5.3 4.5]; trapz(x,y)
In case you have negative values in y, you can do like,
y=max(y,0)