Double integral of matrix

4 次查看(过去 30 天)
John Adams
John Adams 2023-6-25
评论: Mukunda 2025-4-29
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 个评论
Walter Roberson
Walter Roberson 2025-4-29
编辑:Walter Roberson 2025-4-29
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 2025-4-29
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!

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by