How do I automate adding columns together
古いコメントを表示
I have a large data matrix (513*63)
I want to add each column together and then divide them to create a single vector.
At the moment all I can think of is
matrix = 513x63
column_one= [matrix(:,1)]
column_two= [matrix(:,2)]
column_three= [matrix(:,3)]
vector_variable = column_one + column_two + column_three/3
Is there a way that I can automate this process to loop over 63 columns?
1 件のコメント
Walter Roberson
2022 年 5 月 9 日
Are you wanting to take the mean of the 63 sums?
Are you wanting to take 11 groups, 1:3, 4:6 and so on?
Are you wanting to take a moving mean of adjacent groups of 3, 1:3, 2:4, 3:5 and so on?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!