Effacer les filtres
Effacer les filtres

how to find the mininmum value in a double vector ?

3 vues (au cours des 30 derniers jours)
Mira le
Mira le le 28 Nov 2021
Commenté : Image Analyst le 29 Nov 2021
hello every one
I have vector with double values and I want to determine the smallest value as well as irs index
vecto=[ 2.6660 2.2852 10.0000 3.2617 10.0000 10.0000 9.8532]
I use min(vecto)
but it doesn't work
any solution to this problem
mplease help me!
Thank you
  1 commentaire
John D'Errico
John D'Errico le 29 Nov 2021
Pease don't ask the same question a third time.

Connectez-vous pour commenter.

Réponses (1)

Awais Saeed
Awais Saeed le 28 Nov 2021
You are half way there. Use
[value, index] = min(vector)
  1 commentaire
Image Analyst
Image Analyst le 29 Nov 2021
I talked about how that is not the most general or robust way to do it in my answer to his duplicate question:
However it will work as long as you know in advance that the min occurs only once and no more.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Produits


Version

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by