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 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Rajesh
le 14 Oct 2021
Réponse apportée : Mathieu NOE
le 14 Oct 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 commentaires
Réponse acceptée
Mathieu NOE
le 14 Oct 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Data Types dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!