Filter löschen
Filter löschen

calculate the sum of cell's Columns?

2 Ansichten (letzte 30 Tage)
Isay
Isay am 5 Feb. 2015
Kommentiert: Isay am 5 Feb. 2015
Hi
I have One Cell with 500 columns,
you can see the part of it :
I need the Sum of columns from my cell. it means : 49 + 64 + 209 + .... +127
How can i calculate it by Matlab code?

Akzeptierte Antwort

Guillaume
Guillaume am 5 Feb. 2015
If you mean you want the sum of the number of elements in each cell of cell array c:
sum(cellfun(@numel, c))

Weitere Antworten (0)

Kategorien

Mehr zu Data Types finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by