Finding the location of particular value

조회 수: 3 (최근 30일)
Vinay Srinivasan
Vinay Srinivasan 2020년 2월 15일
댓글: Vinay Srinivasan 2020년 2월 15일
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.
Vinay Srinivasan
Vinay Srinivasan 2020년 2월 15일
ok thank you

댓글을 달려면 로그인하십시오.

추가 답변 (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