summing element is a cell
Mostra commenti meno recenti
I have a 1x50 cell 'c', where each element in the cell is a nxn matrix, how can I sum all 50 matrices (c{1}+c{2}+c{3}+.....c{50}) without a loop?
1 Commento
Jos (10584)
il 8 Mar 2019
"without a loop". Why?
Loops are efficient and easy and sometime the best option :-)
Risposte (1)
Stephen23
il 5 Mar 2019
0 voti
sum(cat(3,c{:}),3)
Categorie
Scopri di più su Creating and Concatenating Matrices in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!