Finding the location of particular value

1 次查看(过去 30 天)
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 .

采纳的回答

Walter Roberson
Walter Roberson 2020-2-15
编辑:Walter Roberson 2020-2-15
[maxacc, maxaccidx] = max(acceleration);
maxaccvel = velocity(maxaccidx);
  4 个评论
Walter Roberson
Walter Roberson 2020-2-15
The second output of max is the index where the data was located.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by