How to look for minimum value in a vector from backwards?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
George Ansari
le 23 Août 2017
Modifié(e) : José-Luis
le 23 Août 2017
Suppose I have a vector A = [5 6 4 1 1 1]; I'd like to find the index of a minimum value. If I try min function in a regular way:
[A_min index] = min(A)
it would give me somethin like:
A_min = 1
index = 4
But the result that I'm trying to get should be:
A_min = 1
index = 6
How do I search for a minimum value starting from the end of the vector without flipping it?
George.
0 commentaires
Réponse acceptée
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Matrix Indexing dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!