How to solve this code error in

k = [1];
l = [5];
n = [6];
m = [8];
re = [k l];
ne = [m re];
cv = re.*ne ;

1 comentario

Manish Joshi
Manish Joshi el 31 de Mayo de 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.

Iniciar sesión para comentar.

 Respuesta aceptada

Roger Stafford
Roger Stafford el 31 de Mayo de 2015
Editada: Roger Stafford el 31 de Mayo de 2015

0 votos

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 comentario

gfgf99
gfgf99 el 31 de Mayo de 2015
Editada: gfgf99 el 31 de Mayo de 2015
Thanks for your guidance :)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Physics en Centro de ayuda y File Exchange.

Preguntada:

el 31 de Mayo de 2015

Comentada:

el 31 de Mayo de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by