How does the matrix product block work?

2 ビュー (過去 30 日間)
bao nguyen
bao nguyen 2024 年 1 月 26 日
回答済み: Fangjun Jiang 2024 年 5 月 7 日
I am doing ... just simple matrix multiplication in simulink and it does not work. Just by speculation alone, the 2 input signals that go into the product block have the dimension 2 and [2x2] respectively, so I expect the block should output some 2-vector, but it does not. Could somebody help me?
  1 件のコメント
Paul
Paul 2024 年 1 月 27 日
Are you trying to form M*tau where tau is column vector? Or tau*M where tau is row vector?

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

回答 (2 件)

Walter Roberson
Walter Roberson 2024 年 1 月 26 日
The input signal is dimension 2, not 1 x 2 or 2 x 1. You need to pass it through a reshape block https://www.mathworks.com/help/simulink/slref/reshape.html

Fangjun Jiang
Fangjun Jiang 2024 年 5 月 7 日
For the [1 2] Constant block, un-check "Interpret vector parameters as 1-D".
For your Inport block, specify its Port dimensions as [1 2]

カテゴリ

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

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by