How do I take the mean of each row every third column?

4 ビュー (過去 30 日間)
Fede C 2018 London
Fede C 2018 London 2019 年 11 月 1 日
回答済み: Guillaume 2019 年 11 月 1 日
Hi all,
This is what I'm trying to do- E is a 65x900 array, and I want to extract from that the mean for each row of every third column-in other words, for rows 1 to 65, I want the mean across each row but only of values in columns 1, 4, 7,10, etc, so that I get a 65x1 vector-how would I do that?
Best regards

採用された回答

Guillaume
Guillaume 2019 年 11 月 1 日
mean(yourarray(:, 1:3:end), 2)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Object Programming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by