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!