MATLAB: Finding the location of particular value

array indexing

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 .

Best Answer

[maxacc, maxaccidx] = max(acceleration);
maxaccvel = velocity(maxaccidx);
Related Question