READ THE ERRORR MESSAGE! LOOK AT YOUR DATA!
[Touch_Down,Toe_Off]
ans =
218 225
245 253
272 280
285 285
287 287
299 307
326 334
339 342
353 361
380 388
407 414
418 418
434 441
444 452
461 469
472 475
489 496
502 503
516 524
543 550
569 577
597 604
623 631
651 659
678 686
705 714
733 741
760 769
788 796
815 823
842 850
869 877
896 904
924 931
950 958
977 985
1004 1012
1031 1040
1059 1067
1086 1094
1113 1121
1139 1147
1165 1174
1193 1201
1221 1229
1249 1257
1276 1284
You have this:
data=mm3(Touch_Down(i,1):Toe_Off(i,1),2);
How long is the vector:
Touch_Down(i,1):Toe_Off(i,1)
when i == 4, or 5, or 6? In those cases, what is length(data)?
Now go back and re-read the error message.