フィルターのクリア

How can I choose a set of columns from my table. I have to get the means of let's say columns 1 and 5, columns 2 and 6 etc from 20 columns. Thanks

2 ビュー (過去 30 日間)
Does this look like a correct line of code? x = mean(w(:,[1:4:10 11:4:20]));

採用された回答

Sadik
Sadik 2017 年 5 月 26 日
Looks correct. Means of columns 1 and 5, for instance, would look like this:
x = mean(w(:,[1 5]))
Best.
  1 件のコメント
Abdullah Al Jaja
Abdullah Al Jaja 2017 年 5 月 26 日
Thanks for answering my question. But how can I add the rest of the columns (1&5 2&6 3&7 etc...)?
Thanks

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by