PlotRasters(SpikeTi​mes,start,varargin)

版本 1.0.0.0 (6.4 KB) 作者: Jordan Sorokin
A function to plot rasters of neural spikes from a matrix of spike times.
278.0 次下载
更新时间 2015/12/11

查看许可证

The purpose of this function of primarily for visual inspection of neural spike trains. It takes in a matrix of spike times or cell array, where each cell is composed of a matrix of spike times. The only requirements that this function imposes is that the matrix(ices) of spike times are in column-vector format. The function is more interpretable if everything is represented in seconds, however the actual plotting will work just as well if spike times, pre/post plotting times, and relative start times (i.e. origin on the x-axis) are in samples, milliseconds, etc.
Inputs:
SpikeTimes: an n x m matrix or cell array of n x m matrices of spike times, where n = total spikes, m = # trials.

If SpikeTimes is a single matrix, the function assumes the data comes from one channel only, and that m = # trials. If SpikeTimes is a cell array, the function assumes each cell is a separate channel. Multiple raster plots as subplots will be created, one for each channel. However, this will only work for up to 9 channels...this was chosen to avoid memory issues when plotting dense rasters.

Start = starting time of the event of interest. Usually rasters are plotted relative to an external stimulus to look at firing rate differences. The "start" here is arbitrary...we can set it to anything we like, however if if exceeds the maximum SpikeTime, we won't see any spikes on our plot.

Other optional inputs include:
Pretime = pre time from the "start" to plot
posttime = post time from the "start" to plot
tick = height of the individual tick marks

You can also specify to save the raster plot automatically or not, and can add a prefix to the filename. Refer to the function for more details on usage and inputs/outputs.

引用格式

Jordan Sorokin (2024). PlotRasters(SpikeTimes,start,varargin) (https://www.mathworks.com/matlabcentral/fileexchange/54475-plotrasters-spiketimes-start-varargin), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2013a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Electrophysiology 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0