I have a vector, A = [1:50].
I also have a matrix for starts and ends of events (element number start to element number finish);
if true B = [ start_of_event_1 end_of_event_1 start_of_event_2 end_of_event_2 ]end
This goes on for ~200 events. I want to change the elements of the vector between these points to zero. I am not sure how to go about this. I have tried:
if true A(B(:,1):B(:,2)) = 0;end
This has not worked so far.
Background: zero-ing is needed rather than removing values altogether for further analysis (time domain needs to stay).
Best Answer