How to solve this code error in

2 次查看(过去 30 天)
k = [1];
l = [5];
n = [6];
m = [8];
re = [k l];
ne = [m re];
cv = re.*ne ;
  1 个评论
Manish Joshi
Manish Joshi 2015-5-31
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.

请先登录,再进行评论。

采纳的回答

Roger Stafford
Roger Stafford 2015-5-31
编辑:Roger Stafford 2015-5-31
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?

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by