Finding numbers over a value in a matrix/array
Mostra commenti meno recenti
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.
Risposta accettata
Più risposte (2)
Andrei Bobrov
il 14 Giu 2013
A = rand(20,10);
A(A < .3) = -A(A < .3); % your array
out = nnz(A < 0);
1 Commento
Brian
il 14 Giu 2013
Azzi Abdelmalek
il 14 Giu 2013
range=2
idx=find(abs(yourarray)<range)
Categorie
Scopri di più su Creating and Concatenating Matrices in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!