フィルターのクリア

Multiplying two 3-dimensional matrices

3 ビュー (過去 30 日間)
Vecihi He
Vecihi He 2023 年 2 月 4 日
コメント済み: Torsten 2023 年 2 月 4 日
I want to multiply (*) the conjugate of a matrix A of size 30x64x4 by a matrix B of size 64x30x4 and get a single result. How can I multiply in Matlab?

回答 (1 件)

Torsten
Torsten 2023 年 2 月 4 日
編集済み: Torsten 2023 年 2 月 4 日
A = rand(30,64,4);
B = rand(64,30,4);
for i = 1:size(A,3)
C1(:,:,i) = conj(A(:,:,i))*B(:,:,i);
C2(:,:,i) = B(:,:,i)*conj(A(:,:,i));
end
size(C1)
ans = 1×3
30 30 4
size(C2)
ans = 1×3
64 64 4
  2 件のコメント
Vecihi He
Vecihi He 2023 年 2 月 4 日
"size(A,3) " I don't understand why you made this expression. I want the result to be a single number, for example 0.034, when I multiply the 3D matrices A and B. How can I do it?
Torsten
Torsten 2023 年 2 月 4 日
I want the result to be a single number, for example 0.034, when I multiply the 3D matrices A and B.
Then you must define a new rule how to accomplish this. If you include the rule here, someone might be able to implement it.
You could start with a (3x2) and a (2x3) matrix and show us how your rule should look like for 2d-matrices.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by