Filter löschen
Filter löschen

How to solve this code error in

1 Ansicht (letzte 30 Tage)
gfgf99
gfgf99 am 31 Mai 2015
Kommentiert: Manish Joshi am 31 Mai 2015
k = [1];
l = [5];
n = [6];
m = [8];
re = [k l];
ne = [m re];
cv = re.*ne ;
  1 Kommentar
Manish Joshi
Manish Joshi am 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.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Roger Stafford
Roger Stafford am 31 Mai 2015
Bearbeitet: Roger Stafford am 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 Kommentar
gfgf99
gfgf99 am 31 Mai 2015
Bearbeitet: gfgf99 am 31 Mai 2015
Thanks for your guidance :)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by