Hi,
I am trying to find segments of data from intervals of start and stop times. The data is a matrix with data in the first column and time stamps in the second column that correspond to the interval times. I would like to get the data in the first column that corresponds to the time stamps in the second column. I would also like the out put interval (there are multiple intervals, in the samples I provided there are 3) to be that each segment is in a separate matrix row or column or even cell array (any is find I just want them to be separate). I have tried some code but am getting empty cell array outputs:
for i=1:numel(interval(:,1)) w=interval(i,:); output{i}=intersect(data(find(data>=w(1))),data(find(data<=w(2))));end
I have attached an example of data in a matrix data and intervals in matrix interval. Any help would be wonderful.
Best Answer