Finding numbers over a value in a matrix/array
Afficher commentaires plus anciens
Hi, I have a 365x10 matrix/array? not sure what it would be called need to find the amount of numbers in a certain range/below a certain value eg 0.
Thanks for any help.
Réponse acceptée
Plus de réponses (2)
Andrei Bobrov
le 14 Juin 2013
A = rand(20,10);
A(A < .3) = -A(A < .3); % your array
out = nnz(A < 0);
1 commentaire
Brian
le 14 Juin 2013
Azzi Abdelmalek
le 14 Juin 2013
range=2
idx=find(abs(yourarray)<range)
Catégories
En savoir plus sur Matrix Indexing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!