Borrar filtros
Borrar filtros

Sum of cell array column

8 visualizaciones (últimos 30 días)
Mohammed
Mohammed el 27 de Mayo de 2013
Comentada: Ahmet el 31 de En. de 2014
Hi
I have this cell array and I need to get the sum of column 11. How? Please help.
summary3 =
Columns 1 through 3
{1x39 cell} {1x75 cell} [ 7.669142585357160e-04]
{1x75 cell} {1x75 cell} [-1.206232786783515e-04]
{1x39 cell} {1x41 cell} [ 8.630787019556518e-04]
{1x41 cell} {1x65 cell} [-2.445883525841570e-05]
{1x65 cell} {1x97 cell} [ 9.109657363289406e-04]
Columns 4 through 6
[-1.206232786783515e-04] [3.231454899286823e-04] [150]
[ 0.001808452047926] [8.439143846238298e-04] [-40]
[-2.445883525841570e-05] [4.193099333486180e-04] [170]
[ 9.109657363289406e-04] [4.432534505352624e-04] [-20]
[-6.645138877833179e-04] [1.232259242728113e-04] [180]
Columns 7 through 11
[ -40] [ 55] [1x1 sym] [1x1 sym] [1x1 sym]
[ 330] [145] [1x1 sym] [1x1 sym] [1x1 sym]
[ -20] [ 75] [1x1 sym] [1x1 sym] [1x1 sym]
[ 180] [ 80] [1x1 sym] [1x1 sym] [1x1 sym]
[-140] [ 20] [1x1 sym] [1x1 sym] [1x1 sym]

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 27 de Mayo de 2013
oout=sum(cellfun(@double,summary3(:,11)))
  2 comentarios
Mohammed
Mohammed el 28 de Mayo de 2013
Thank you very much, working great
Ahmet
Ahmet el 31 de En. de 2014
Thank you :) you helped me too

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by