Finding the location of particular value

3 visualizaciones (últimos 30 días)
Vinay Srinivasan
Vinay Srinivasan el 15 de Feb. de 2020
Comentada: Vinay Srinivasan el 15 de Feb. de 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 .

Respuesta aceptada

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by