I have m*n matrix. I want keep only those rows whose atleast one element is greater than any specific value such as 1.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Rajesh
am 14 Okt. 2021
Beantwortet: Mathieu NOE
am 14 Okt. 2021
I have m*n matrix. I want keep only those rows whose atleast one element is greater than any specific value such as 1.
0 Kommentare
Akzeptierte Antwort
Mathieu NOE
am 14 Okt. 2021
hello
try this
m = 3;
n = 5;
A= 1.15*rand(m,n);
threshold = 1;
a = A>threshold;
rows = find(any(a, 2));
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Types 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!