Double integration of a matrix

4 views (last 30 days)
Can someone help me with double integration of 12*12 matrix (wrt x and wrt y of elements of the matrix).
I have input the element values in a matrix say F.

Accepted Answer

Star Strider
Star Strider on 26 Apr 2021
I sould use trapz once in each dimension of the matrix, so something like —
A = rand(12); % Create Matrix
Col_int = trapz(A)
Col_int = 1×12
5.3213 4.3935 5.9568 5.1788 5.2908 6.0508 4.8846 5.8156 7.0526 4.7635 3.5491 5.3651
Full_int = trapz(Col_int)
Full_int = 58.2793
  3 Comments
MANJEET YADAV
MANJEET YADAV on 26 Apr 2021
Suppose A=[x xy; x^3+y^2 x*y^3]
then how we will double integrate with limits in x and y
Star Strider
Star Strider on 26 Apr 2021
None of that was in the original post!
Assuming that the intent is to do this symbolically —
syms x y x1 x2 y1 y2
A=[x x*y; x^3+y^2 x*y^3]
A = 
int_x = int(A, x, x1, x2)
int_x = 
intxy = int(int_x, y, y1, y2)
intxy = 

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!