how to find out how many columns have more than 50 elements which are greater than 1?
조회 수: 1 (최근 30일)
이전 댓글 표시
I currently have a matrix that's 100*100 size, and I wish to work out how many columns have more than 50 elements which are greater than 1. Is it possible to do it using only rudimentary functions like find(), mod(), length(), numel(), etc?
댓글 수: 0
채택된 답변
KALYAN ACHARJYA
2019년 10월 15일
편집: KALYAN ACHARJYA
2019년 10월 15일
I currently have a matrix that's 100*100 size, and I wish to work out how many columns have more than 50 elements which are greater than 1
Lets say matrix 100*100 named as data
idx=data>1;
result=sum(idx);
data2=result>50;
fprintf('The column number is: %d',sum(data2(:)));
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!