how to use function "find" over matrices
Mostrar comentarios más antiguos
Suppose x = rand(1e5,1e5);
I want to find the lowest number in each column of x without using for loop.
Is it possible?
Respuesta aceptada
Más respuestas (1)
David Hill
el 9 de Abr. de 2020
min(x);
3 comentarios
parham kianian
el 9 de Abr. de 2020
Editada: parham kianian
el 9 de Abr. de 2020
David Hill
el 10 de Abr. de 2020
x = rand(1e4);
a = x.*(x>.2&x<.25);
b=arrayfun(@(y)a(find(a(:,y),1),y),1:size(a,2));
parham kianian
el 10 de Abr. de 2020
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!