Aligning 5 second interval data of continuous time to the same interval
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Krispy Scripts
el 20 de Jun. de 2016
Comentada: Krispy Scripts
el 5 de Ag. de 2016
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.
0 comentarios
Respuesta aceptada
Star Strider
el 20 de Jun. de 2016
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 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!