I have an anonymous function with two arguments, x and y. I would like to evaluate the integral of this function over a finite range. I also have a pdf m that is defined over the relevant range. However, for the pdf I don't have a functional form, but only know its values at specific grid points. That is, m is a matrix over the range x=[1 35] and y=[1 2000] with 35*2000 elements. The grid is not equally spaced (it's log spaced).
I know how I can use 'integral2' to evaluate my anonymous function. But how can I add the pdf s.t. the integral reflects the different densities at each point of x and y? I've tried to use griddedInterpolant for m, but the Interpolant cannot be fed into integral2.