Finding the location of particular value

3 vues (au cours des 30 derniers jours)
Vinay Srinivasan
Vinay Srinivasan le 15 Fév 2020
Commenté : Vinay Srinivasan le 15 Fév 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 .

Réponse acceptée

Walter Roberson
Walter Roberson le 15 Fév 2020
Modifié(e) : Walter Roberson le 15 Fév 2020
[maxacc, maxaccidx] = max(acceleration);
maxaccvel = velocity(maxaccidx);
  4 commentaires
Walter Roberson
Walter Roberson le 15 Fév 2020
The second output of max is the index where the data was located.
Vinay Srinivasan
Vinay Srinivasan le 15 Fév 2020
ok thank you

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by