How to do a Matrix Aggregation.

4 次查看(过去 30 天)
Amine Ben Ayara
Amine Ben Ayara 2016-5-23
评论: Matt J 2016-5-27
I have 19720 of (7by7) matrices stacked up in excel file ( so basically a total of 138040 row). I want to aggregate these matrices into one (7by7) matrix where each row element represents the sum of all the elements in the rows from each (7by7) matrix. Any suggestions, please.

回答(1 个)

Matt J
Matt J 2016-5-23
Once you've read your data into a 138040x7 matrix, A
aggregation =sum( reshape(A.',7,7,[]) ,3).' ;
  4 个评论
Amine Ben Ayara
Amine Ben Ayara 2016-5-26
Please look at the screen shot that I have from my Matlab workspace. So my input matrix is
Matt J
Matt J 2016-5-27
I have looked at it. It confirms what I said. You said you have 138040 rows, but the screenshot shows only 138039.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Data Export to MATLAB 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by