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.';

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Modeling에 대해 자세히 알아보기

제품

질문:

2020년 11월 10일

댓글:

2020년 11월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by