I need to calculate numerical integration of unequally spaced data accurately. For equally spaced data, richardson extrapolation on romberg integral works quite well.
http://en.wikipedia.org/wiki/Romberg%27s_method#A_geometric_example
Besides I intend to use same on matlab, so any function implementing the same will be helpful.
The trapezoid rule generalizes easily to unequally spaced data -- see Wikipedia.
A simple MATLAB function that takes the vectors $\textbf{x} = [x_1, x_2, \ldots, x_N]$ and $\textbf{y} = [f(x_1), f(x_2), \ldots, f(x_N)]$ is as follows: