Clear Filters
Clear Filters

Setting time intervals in a cell array all to the same 0 to 5 second time interval

4 views (last 30 days)
I am trying to find the spiking rates over 5 second intervals of time. I have the spike times of intervals in a cell array(spk). I am wondering if it is possible or if any of you clever coders might know of a way to set all of the intervals and spike times contained within those intervals to 0 to 5 second interval. For example, the spike time of the first interval in the cell is 59.031, so put that as 0.031. The next 59.0599 to 0.0599. Is this possible?
Krispy Scripts
Krispy Scripts on 13 Jun 2016
My apologies on lack of clarity. These spike times are times when recorded neurons are firing, so it is just the time stamp. I have this five second window of time during which a behavior is occurring that I would like to see the spiking rate or amount of spikes happening per time over this five seconds. I attached an image that I hope will show exactly what I am trying to do once I have what I am asking here. I can calculate for this, but I need two things. First I need all of the spike times in those intervals in cell arrays, like I have in the spks.mat attached. The second is that I need all of the spike times in the five second window relative to each other, so when all the intervals start, no matter what time that becomes time 0. The time of these stamps is continually happening so I need a way to take these five second intervals and set all of the first. My apologies again because I did not attach the interval matrix, but I attached it here. So the spike times from the intervals are in the spks.mat, but I need to set the beginning of the interval as time 0 for all of these interval's spike times? Does this make it more clear? My apologies again for the lack of clarity from my first post and in advance if this does not help.
Image is not supported, but here is a google link to peri-stimulus histograms and raster plots of spiking rates over time periods.

Sign in to comment.

Answers (1)

Andrew Bliss
Andrew Bliss on 13 Jun 2016
Not quite sure what you're trying to do, but wouldn't mod help? E.g.


Find more on Electrophysiology in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!