sum a column in a matrix

4 visualizaciones (últimos 30 días)
Berfin Çetinkaya
Berfin Çetinkaya el 13 de Mayo de 2022
Comentada: Berfin Çetinkaya el 15 de Mayo de 2022
Hi guys
I have 20 matrices like in my photo. I want to sum the 7th column of each matrix. Then how can I print the values of the 20 matrices that I have collected for the 7th columns in a single column one after the other?

Respuesta aceptada

Stephen23
Stephen23 el 13 de Mayo de 2022
F = @(t) sum(t{:,7});
V = cellfun(F,Tables)
  3 comentarios
Stephen23
Stephen23 el 14 de Mayo de 2022
"Can we convert it to a single column?"
V = V(:)
Berfin Çetinkaya
Berfin Çetinkaya el 15 de Mayo de 2022
Thank you !

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by