how to use function "find" over matrices
Afficher commentaires plus anciens
Suppose x = rand(1e5,1e5);
I want to find the lowest number in each column of x without using for loop.
Is it possible?
Réponse acceptée
Plus de réponses (1)
David Hill
le 9 Avr 2020
min(x);
3 commentaires
parham kianian
le 9 Avr 2020
Modifié(e) : parham kianian
le 9 Avr 2020
David Hill
le 10 Avr 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
le 10 Avr 2020
Catégories
En savoir plus sur Creating and Concatenating Matrices 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!