Finding numbers over a value in a matrix/array
Ältere Kommentare anzeigen
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.
Akzeptierte Antwort
Weitere Antworten (2)
Andrei Bobrov
am 14 Jun. 2013
A = rand(20,10);
A(A < .3) = -A(A < .3); % your array
out = nnz(A < 0);
1 Kommentar
Brian
am 14 Jun. 2013
Azzi Abdelmalek
am 14 Jun. 2013
range=2
idx=find(abs(yourarray)<range)
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!