Hey all! I have two cell arrays, "spiketimes" and "eyetimes". Both of them contain elements which are essentially time points at which an event occurs. Now, I'm using the following lines of code to select elements of "eyetimes" based on the value of "spiketimes"
idx = ismembertol(eyetime,spiketimes,0.02, 'DataScale',1 );
eyetime = eyetime(idx);
Elaborating on the code a bit further, the index selects elements of "eyetime" for each value of "spiketime" with an interval of 0.02 secs. For eg, if an element of "spiketimes" is 0.250, it'll select all elements of "eyetime" between 0.250+0.02 & 0.250-0.02. I want to modify this code to only select elements of "eyetimes" before 0.250 i.e 0.250-0.02 only. How would I go about executing this? Thanks in advance!