Hello evryone!
I am facing a weid issue with MATLAB function in simulink, I have this multiplication to do:
A = [1;2;3;4];
B = [2;3;5;6];
Z = A'.*B;
which when I do it in a script or workspace I get this result
but somehow it doesn't work in matlab function (simulink) and throughs in a dimenstion error!
is there a way to get around this error ??

2 件のコメント

Mathieu NOE
Mathieu NOE 2020 年 11 月 10 日
hi
have you tried with the already available simulink blocks (transpose, dot product)
yassine kebbati
yassine kebbati 2020 年 11 月 11 日
No i haven't tried this because i do this calculation in the middle of a long code.

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

 採用された回答

Bruno Luong
Bruno Luong 2020 年 11 月 10 日

0 投票

Z = B*A.';

1 件のコメント

yassine kebbati
yassine kebbati 2020 年 11 月 11 日
This works, thank you!

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Simulink についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by