Effacer les filtres
Effacer les filtres

How to solve this code error in

1 vue (au cours des 30 derniers jours)
gfgf99
gfgf99 le 31 Mai 2015
Commenté : Manish Joshi le 31 Mai 2015
k = [1];
l = [5];
n = [6];
m = [8];
re = [k l];
ne = [m re];
cv = re.*ne ;
  1 commentaire
Manish Joshi
Manish Joshi le 31 Mai 2015
re = [1 5] and ne = [8 1 5] both of these contain 2 and three elements respectively whereas in order to use .* both matrices/vectors should have same dimensions.

Connectez-vous pour commenter.

Réponse acceptée

Roger Stafford
Roger Stafford le 31 Mai 2015
Modifié(e) : Roger Stafford le 31 Mai 2015
The vector 're' has 2 elements and 'ne' has 3 elements, so the element-by-element multiplication re.*ne becomes meaningless. How can you pair two elements with three elements?
  1 commentaire
gfgf99
gfgf99 le 31 Mai 2015
Modifié(e) : gfgf99 le 31 Mai 2015
Thanks for your guidance :)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by