Finding the location of particular value

3 Ansichten (letzte 30 Tage)
Vinay Srinivasan
Vinay Srinivasan am 15 Feb. 2020
Kommentiert: Vinay Srinivasan am 15 Feb. 2020
Hello
I have a matlab data file which has 4 variables like time,velocity ,acceleration . Each variable has 2000values . I need maximum acceleration,so I used max(acceleration).Now I need to know the velocity at maximum acceleration from the data. How to get that value .

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 15 Feb. 2020
Bearbeitet: Walter Roberson am 15 Feb. 2020
[maxacc, maxaccidx] = max(acceleration);
maxaccvel = velocity(maxaccidx);
  4 Kommentare
Walter Roberson
Walter Roberson am 15 Feb. 2020
The second output of max is the index where the data was located.
Vinay Srinivasan
Vinay Srinivasan am 15 Feb. 2020
ok thank you

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by