sum a column in a matrix

1 次查看(过去 30 天)
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?

采纳的回答

Stephen23
Stephen23 2022-5-13
F = @(t) sum(t{:,7});
V = cellfun(F,Tables)
  3 个评论
Stephen23
Stephen23 2022-5-14
"Can we convert it to a single column?"
V = V(:)

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Numeric Types 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by