calculate the sum of cell's Columns?

2 vues (au cours des 30 derniers jours)
Isay
Isay le 5 Fév 2015
Commenté : Isay le 5 Fév 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?

Réponse acceptée

Guillaume
Guillaume le 5 Fév 2015
If you mean you want the sum of the number of elements in each cell of cell array c:
sum(cellfun(@numel, c))
  1 commentaire
Isay
Isay le 5 Fév 2015
Thank You :)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Multidimensional Arrays dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by