Vector multiplication elementwise error
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
yassine kebbati
am 10 Nov. 2020
Kommentiert: yassine kebbati
am 11 Nov. 2020
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/409650/image.jpeg)
but somehow it doesn't work in matlab function (simulink) and throughs in a dimenstion error!
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/409660/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/409655/image.jpeg)
is there a way to get around this error ??
2 Kommentare
Mathieu NOE
am 10 Nov. 2020
hi
have you tried with the already available simulink blocks (transpose, dot product)
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Array and Matrix Mathematics finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!