Finding numbers over a value in a matrix/array
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (2)
Andrei Bobrov
el 14 de Jun. de 2013
A = rand(20,10);
A(A < .3) = -A(A < .3); % your array
out = nnz(A < 0);
1 comentario
Brian
el 14 de Jun. de 2013
Azzi Abdelmalek
el 14 de Jun. de 2013
range=2
idx=find(abs(yourarray)<range)
Categorías
Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!