RASTERPLOT.M Display spike rasters.
RASTERPLOT(T,N,L) Plots the rasters of spiketimes (T in samples) for N trials, each of length L samples, Sampling rate = 1kHz. Spiketimes are hashed by the trial length.
RASTERPLOT(T,N,L,H) Plots the rasters in the axis handle H
RASTERPLOT(T,N,L,H,FS) Plots the rasters in the axis handle H. Uses sampling rate of FS (Hz)
t=[10 250 9000 1300,1600,2405,2900];
Rajiv Narayan (2021). Rasterplot (https://www.mathworks.com/matlabcentral/fileexchange/10000-rasterplot), MATLAB Central File Exchange. Retrieved .
Simple to read & give commend, powerful in use.
No need to load datafiles so quite great compatibility.
does this work if I have trials of varying length?
I agree very useful thanks.
Another common method of storing spike data is in matrix form, with ones denoting spikes and zeros denoting no spikes. Its easy to use to this format in rasterplot.
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!