필터 지우기
필터 지우기

Aligning 5 second interval data of continuous time to the same interval

조회 수: 1 (최근 30일)
I have an array of times at which neurons are firing, spike times, that are all 5 second intervals. However, these intervals are increasing due to the data recording being done at the same time. Is there a way I can zero these five second intervals so that there time stamps are over the same time scale, say 0 to 5 seconds. Basically take 5 second intervals of time stamps from 16-21 seconds or 19-34 and 'zero' them from a 0 to 5 second scale. The attached matrix has an example of time stamps within some five second intervals. The overall goal is to overlay these spike times to look at the firing rate and density etc.
Any help would be greatly appreciated. Please let me know if I need to clear anything up.

채택된 답변

Star Strider
Star Strider 2016년 6월 20일
I’m not sure what you want to do. Your data are also not easy for me to interperet, because they lack a time base.
See if something like this works:
d = load('Heath Robinson spks.mat');
spk = d.spk;
for k1 = 1:size(spk,2)
thrsh = mean(spk{k1}(1:5)) + 5*std(spk{k1}(1:5)); % Define Threshold
dep(k1) = find(spk{k1} >= thrsh, 1, 'first'); % Initial Value Exceeding Threshold
end
figure(1)
plot([1:size(spk{1},2)], spk{1}, dep(1),spk{1}(dep(1)), 'r^')
hold on
plot([1:size(spk{2},2)], spk{2}, dep(2),spk{2}(dep(2)), 'r^')
plot([1:size(spk{3},2)], spk{3}, dep(3),spk{3}(dep(3)), 'r^')
hold off
grid
  댓글 수: 13
Krispy Scripts
Krispy Scripts 2016년 8월 5일
Could you put the code from "out" a way that could do it to more than just three sets of spikes and intervals?
I posted it as a question here:

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Electrophysiology에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by