Hello, I am trying to process a data vector, ignoring the B first and C last samples of each trial. It should be the following:
A = [1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,5,5,5,5,5] % data vector
B= 1 % delete n initial repeated values
C=2 % delete n final repeated values
Replacing unwanted data for -1 for example
A = [-1,1,1,1,1,-1,2,2,2,2,-1,3,3,3,3,-1,4,4,4,4,-,5,5,5,5] %removing the n = 1 first elements of each repeated streak
A= [-1,1,1,-1,-1,-1,2,2,-1,-1,-1,3,3,-1,-1,-1,4,4,-1,-1,-1,5,5,-1,-1] % removing the n=1 first and n = 2last elements of each repeated streak
Any help please?
Best Answer