I want to be able to detect when a sequence of numbers starts and finishes in an array. For example, if I have
A = [1 0 1 0 1 0 1 1 0 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0]; B = [1 1 0 0];
Can I determine whether A contains B and if A does contain B, get the index of A that B starts and stops (so 7 and 18 here)
Thank you
Best Answer