Selecting certain rows in an array

Hi all, Matlab newbie here. I'm sure this is not a complicated question but I'm having no luck.
I have an array of 512 rows and 5 columns. Let's say column 1 is called A, 2 is called B, etc. I want to find row numbers where the value in A>0.10*max(A) and B<0.10*max(B), C<0.10*max(C), D<0.10*max(D). In other words, I want indexes where the value in only one column is greater than 10% of the max value in that column.
Any ideas? Thank you in advance, I learn a lot from these answers.

 採用された回答

Walter Roberson
Walter Roberson 2013 年 8 月 29 日

0 投票

Supposing the array is R, then
cutoff = 0.10 * max(R); %max goes column by colum
find( R(:,1) > cutoff(1) & R(:,2) < cutoff(2) & R(:,3) < cutoff(3) & R(:,4) < cutoff(4) )

1 件のコメント

Molly
Molly 2013 年 8 月 29 日
Worked like a charm! Thank you :)

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMatrix Indexing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by