Find max value position

5 vues (au cours des 30 derniers jours)
Gonzalo Guerrero
Gonzalo Guerrero le 1 Juin 2020
Hi,
I am trying to sort out a problem where I got 210 rows in 1 column, which variable is called 'Force1' and I need to find the position of the max value. I tried the next code:
x=find(max(Force1))
The actual value is in row 170, however, matlab gives me x=1.
Then I tried to apply this one:
x=find(max(Force1))
and result is x= to 210 rows where first one is the max value and then 0
Thank you
Gonzalo Gomez Guerrero

Réponse acceptée

KALYAN ACHARJYA
KALYAN ACHARJYA le 1 Juin 2020
Modifié(e) : KALYAN ACHARJYA le 1 Juin 2020
x=find(Force1==max(Force1))
  3 commentaires
KALYAN ACHARJYA
KALYAN ACHARJYA le 1 Juin 2020
Sorry, my bad
Gonzalo Guerrero
Gonzalo Guerrero le 1 Juin 2020
Thank you, it worked! :D

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Data Type Conversion dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by