Implement combination operations in two multi-dimensional matrix
    2 次查看(过去 30 天)
  
       显示 更早的评论
    
Dear all;
I have a two multidimensional matrix of each 4-by-24.I wanted to performe the combination of the two matrix in row and pefrom that combnation for the number of times equal with the column,let me make it more clear as:
 M1=4*ones(4,24);
M2=2*ones(4,24);
Then,I want to calculate the value of A for the combination of rows in M1 and M2,and that calculation should be repeated for 24 times
A=M1+0.5*M2
This is my try
[X,Y]=ndgrid(M1,M2);
for c=1:numel(X)
    for t=1:24
        A(c,time)=M1(c,time)+0.5*M2(c,time)
    end
end
Can anyone help me on this regard?thanks
0 个评论
回答(0 个)
另请参阅
类别
				在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
			
	产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!