Effacer les filtres
Effacer les filtres

Vector multiplication elementwise error

3 vues (au cours des 30 derniers jours)
yassine kebbati
yassine kebbati le 10 Nov 2020
Commenté : yassine kebbati le 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
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 commentaires
Mathieu NOE
Mathieu NOE le 10 Nov 2020
hi
have you tried with the already available simulink blocks (transpose, dot product)
yassine kebbati
yassine kebbati le 11 Nov 2020
No i haven't tried this because i do this calculation in the middle of a long code.

Connectez-vous pour commenter.

Réponse acceptée

Bruno Luong
Bruno Luong le 10 Nov 2020
  1 commentaire
yassine kebbati
yassine kebbati le 11 Nov 2020
This works, thank you!

Connectez-vous pour commenter.

Plus de réponses (0)

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by