Azzera filtri
Azzera filtri

How to solve this code error in

1 visualizzazione (ultimi 30 giorni)
gfgf99
gfgf99 il 31 Mag 2015
Commentato: Manish Joshi il 31 Mag 2015
k = [1];
l = [5];
n = [6];
m = [8];
re = [k l];
ne = [m re];
cv = re.*ne ;
  1 Commento
Manish Joshi
Manish Joshi il 31 Mag 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.

Accedi per commentare.

Risposta accettata

Roger Stafford
Roger Stafford il 31 Mag 2015
Modificato: Roger Stafford il 31 Mag 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 Commento
gfgf99
gfgf99 il 31 Mag 2015
Modificato: gfgf99 il 31 Mag 2015
Thanks for your guidance :)

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Matrices and Arrays in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by