Multiplication of two arrays of different size

59 ビュー (過去 30 日間)
VIKASH KUMAR VERMA
VIKASH KUMAR VERMA 2023 年 5 月 2 日
回答済み: the cyclist 2023 年 5 月 2 日
I have two arrays of different size. For example, one array is 43008*24 and other one 33792*24. Ho can I multilpy them?
  3 件のコメント
the cyclist
the cyclist 2023 年 5 月 2 日
Let's make a smaller, manageable version of what you are asking for. Suppose
A = [2 3; 5 7; 11 13]
A = 3×2
2 3 5 7 11 13
B = [4 6; 8 9; 10 12; 14 15]
B = 4×2
4 6 8 9 10 12 14 15
You want C that somehow equals the product of A and B. What is the result in this case?
VIKASH KUMAR VERMA
VIKASH KUMAR VERMA 2023 年 5 月 2 日
If I take transpose of B and then multiply them, then I will get 3*4 matrix.

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

回答 (1 件)

the cyclist
the cyclist 2023 年 5 月 2 日
A = [2 3; 5 7; 11 13];
B = [4 6; 8 9; 10 12; 14 15];
C = A * B.'
C = 3×4
26 43 56 73 62 103 134 175 122 205 266 349

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by