How to do a Matrix Aggregation.
Afficher commentaires plus anciens
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.
Réponses (1)
Matt J
le 23 Mai 2016
Once you've read your data into a 138040x7 matrix, A
aggregation =sum( reshape(A.',7,7,[]) ,3).' ;
4 commentaires
Amine Ben Ayara
le 23 Mai 2016
Modifié(e) : Matt J
le 23 Mai 2016
MATLAB is saying that you read only 966273 elements into Period1, but you should have 7 more,
>> 138040*7
ans =
966280
Amine Ben Ayara
le 26 Mai 2016
Matt J
le 27 Mai 2016
I have looked at it. It confirms what I said. You said you have 138040 rows, but the screenshot shows only 138039.
Catégories
En savoir plus sur Matrix Indexing dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!