Double integral of matrix

4 views (last 30 days)
John Adams
John Adams on 25 Jun 2023
Commented: Mukunda on 29 Apr 2025
Hello all,
I need to take double integral of matrix with respect to dy and dy respectively. Also, my matrix consists of the multiplication of its transpose and own so, I got conj text instead of numerical value. Can you help me?
b1 =
[y - 2, 2 - y, y - 1, 1 - y]
[x - 3, 2 - x, x - 2, 3 - x]
b1'
[conj(y) - 2, conj(x) - 3]
[2 - conj(y), 2 - conj(x)]
[conj(y) - 1, conj(x) - 2]
[1 - conj(y), 3 - conj(x)]
I need to take following integral:
Thank you.
  9 Comments
Walter Roberson
Walter Roberson on 29 Apr 2025
Edited: Walter Roberson on 29 Apr 2025
You wrote
b1_func = matlabFunction(b1) %Converts to a function that can be integrated
which creates an anonymous function handle representing the exxpression in b1 . You then int() the anonymous function -- which converts the anonymous function back into a symbolic expression again.
I, on the other hand, used
b1_func(x,y) = b1
which creates a symbolic function from b1 with parameters x and y. I then proceed to int() the anonymous function -- saving the step of converting to a function handle.
If you were going to use matlabFunction() then you should have used numeric integration using nested integral() calls and the 'arrayvalued' option. (You cannot use integral2() because integral2() does not work with expressions that return arrays.)
Mukunda
Mukunda on 29 Apr 2025
Ah, I see. Thank you!
My Code was incomplete in the above written comment. It worked for me as I added those things in code(but those lines were way above).
Thank you!

Sign in to comment.

Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!