Matrix Manipulation Average of specific column
4 ビュー (過去 30 日間)
古いコメントを表示
I have data in excel that is 17 columns by 4800 rows. I need to find all the numbers in each column separately that are greater then 10 and then find there average. This needs to be done for each 17 columns. Just unsure how to do this. Thank You!
0 件のコメント
回答 (1 件)
the cyclist
2018 年 9 月 27 日
編集済み: the cyclist
2018 年 9 月 27 日
If A is the array with your values, then
A10 = (A > 10);
meanA = sum(A.*A10)./sum(A10)
5 件のコメント
the cyclist
2018 年 9 月 27 日
I don't quite follow your explanation.
I suggest you ...
- open up a new question
- give a very small illustrative example (e.g. maybe just 4x3) what the input matrix looks like
- explain what you expect for the output, and why
It's helpful if you define the input matrix in actual MATLAB code, and not just explain what it is like.
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!