how to use function "find" over matrices
Mostra commenti meno recenti
Suppose x = rand(1e5,1e5);
I want to find the lowest number in each column of x without using for loop.
Is it possible?
Risposta accettata
Più risposte (1)
David Hill
il 9 Apr 2020
min(x);
3 Commenti
parham kianian
il 9 Apr 2020
Modificato: parham kianian
il 9 Apr 2020
David Hill
il 10 Apr 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
il 10 Apr 2020
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!