How to do 3D matrix multiplication

4 ビュー (過去 30 日間)
ANUSAYA SWAIN
ANUSAYA SWAIN 2024 年 4 月 20 日
回答済み: Bruno Luong 2024 年 4 月 20 日
I have a matrix A of size [56X32X10] and a matrix B of size [32X32X10]. How to multiply these two matrices such that the resultant matrix will be of size [56X32X10].
I used C=A.*B.
However its showing error "Arrays have incompatible sizes for this operation."

採用された回答

Bruno Luong
Bruno Luong 2024 年 4 月 20 日
A = rand(56,32,10);
B = rand(32,32,10);
C = pagemtimes(A,B);
size(C)
ans = 1x3
56 32 10
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by