MATLAB Answers

Find max value position

10 views (last 30 days)
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

  0 Comments

Sign in to comment.

Accepted Answer

KALYAN ACHARJYA
KALYAN ACHARJYA on 1 Jun 2020
Edited: KALYAN ACHARJYA on 1 Jun 2020
x=find(Force1==max(Force1))

  3 Comments

madhan ravi
madhan ravi on 1 Jun 2020
Why is an additional transpose needed?
KALYAN ACHARJYA
KALYAN ACHARJYA on 1 Jun 2020
Sorry, my bad
Gonzalo Guerrero
Gonzalo Guerrero on 1 Jun 2020
Thank you, it worked! :D

Sign in to comment.

More Answers (0)

Tags