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) )

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by