
Trying to Vectorize Double Integrals
Posted:
Aug 5, 1996 2:13 PM


Has anyone worked out a way to allow numerical 2D integration, with vector inputs for the upper/lower bounds in the two dimensions? The mathworks FAQ page describes an mfile called "dblquad", which calls "quad.m" twice in a nested fashion to perform the integration over the two dimensions, but only returns a single value, i.e.:
x = dblquad('function_xy',xlow,xhigh,ylow,yhigh)
where x, xlow, xhigh, ylow, yhigh are scaler values (1x1).
I'm modeling a focal plane array in Matlab as an MxN array of pixels, with a continuous pointspread function. I want to evaluate the total energy over each pixel by integrating the 2D pointspread function over each pixel, like in the following pseudocode...
rows = 1:1:M cols = 1:1:N Energy_on_FPA = vector_dblquad('psf', (rows  0.5), (rows + 0.5), ... (cols  0.5), (cols + 0.5))
Where Energy_on_FPA is a MxN matrix, with each element being the integral of the 2D pointspread function over a given pixel, centered at coordinates (row,col).
Any suggestions? I already looked in the numerical integration toolbox in the usersupplied function section of the ftp site, but to no avail...
Thanks,
Thomas Kragh tjkragh@naa.rockwell.com tjkragh@chelsea.ios.com

