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 Center および File ExchangeProgramming についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by