how to find out how many columns have more than 50 elements which are greater than 1?
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Yuchen Song
am 15 Okt. 2019
Kommentiert: Yuchen Song
am 15 Okt. 2019
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 Kommentare
Akzeptierte Antwort
KALYAN ACHARJYA
am 15 Okt. 2019
Bearbeitet: KALYAN ACHARJYA
am 15 Okt. 2019
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(:)));
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!