Minimum of a 3X3 matrix
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am trying to find the min and the indices of the min in a 3X3 matrix. want to use a variation of "find(arr == max(arr));"
Kindly help
0 commentaires
Réponse acceptée
Star Strider
le 21 Oct 2016
Modifié(e) : Star Strider
le 21 Oct 2016
Two possible approaches:
A = rand(3); % Create Data
[Amin,idx] = min(A(:)); % One Option
[r,c] = ind2sub(size(A), idx)
[r,c] = find(A == min(A(:))) % Another Option
Amin = A(r,c)
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Digital Filter Analysis dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!