This may help you
Time=[0.5 1.51 2.6 3.65 4.71 6.8 7.9 9.1 10.3 11.1 12.3 15 16.2 17.3 18.5 19.6];
dife=diff(Time);
heelstrike=(dife>1.5).*0+(dife<=1.5).*1
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!