MATLAB Answers

0

how to extract certain data points from a long array based on certain criteria

Asked by harshpurohit11 on 16 Aug 2018
Latest activity Commented on by harshpurohit11 on 17 Aug 2018
veh_velo = [0,0,1,3,7,9,11,15,18,20,19,19...]; accel_pedal = [0,0,2,4,6,9,10,11,12,13,13..]; I want to extract all maximum accel_pedal values whenever veh_velo goes from 0 to 10

  0 Comments

Sign in to comment.

Products


Release

R2014a

1 Answer

Answer by Paolo
on 16 Aug 2018
Edited by Paolo
on 16 Aug 2018
 Accepted Answer

veh_velo = [0,0,1,3,7,9,11,15,18,20,19,19];
accel_pedal = [0,0,2,4,6,9,10,11,12,13,13];
accel_pedal(veh_velo >= 0 & veh_velo<=10)