How to do integration for a 2D matrix using MATLAB?(adsbygoogle = window.adsbygoogle || []).push({});

That is to say, suppose I have a bunch of data points over a rectangular region in xy plane, how to find the integral over this plane?

More explicitly, suppose I want to integrate over a square region, [0,4]x[0,4]

my data is

2 4 5 8 6

6 8 7 8 9

1 0 2 0 1

5 2 1 3 2

2 2 2 1 3

Therefore the value at (3,0) is 5, the value at (1,1) is 8, etc.

How to find the integral of these data over this square region?

If it were a 1D vector I am sure I can do it with trapz. But what about 2D? Thanks

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Integration of a 2D matrix using MATLAB

Loading...

Similar Threads - Integration matrix using | Date |
---|---|

Mathematica Cannot do the integral of the Hyper-geometric function? | Mar 11, 2018 |

Matlab Easier way to integrate? | Feb 28, 2018 |

Mathematica Chi square minimisation wrt variables in an integral? | Nov 15, 2017 |

MATLAB Matrix dimensional error in numerical integration | Apr 2, 2012 |

Problems with integrating a function in MATLAB: Inner matrix dimensions must agree | Oct 16, 2009 |

**Physics Forums - The Fusion of Science and Community**