This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
analysis:nsb2016:week13 [2018/07/07 10:19] 127.0.0.1 external edit |
analysis:nsb2016:week13 [2019/07/10 15:03] mvdm |
||
---|---|---|---|
Line 72: | Line 72: | ||
sta_t = spk_t(iSpk)+w(1); | sta_t = spk_t(iSpk)+w(1); | ||
- | sta_idx = nearest(csc.tvec,sta_t); % find index of leading window edge | + | sta_idx = nearest_idx3(csc.tvec,sta_t); % find index of leading window edge |
toAdd = csc.data(sta_idx:sta_idx+length(tvec)-1); % grab LFP snippet for this window | toAdd = csc.data(sta_idx:sta_idx+length(tvec)-1); % grab LFP snippet for this window |