How can i use 'sum' for a 'cell array'?
90 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
masoud jiryaei
il 7 Mag 2019
Commentato: masoud jiryaei
il 10 Mag 2019
Hello
i have a cell array that i want to sum the coulmns ;
A={ 1x2 double , 1x2 double
1x2 double , 1x2 double
1x2 double , 1x2 double
1x2 double , 1x2 double }
0 Commenti
Risposta accettata
KSSV
il 7 Mag 2019
A = cell(4,2) ;
for i = 1:4
for j = 1:2
A{i,j} = rand(1,2) ;
end
end
B = cellfun(@sum,A)
Più risposte (1)
Vedere anche
Categorie
Scopri di più su Matrix Indexing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!