Psth

版本 1.0.0.0 (1.7 KB) 作者: Rajiv Narayan
Computes the peri-stimulus time histogram for neural spike times
4.4K 次下载
更新时间 2007/4/23

查看许可证

PSTH Computes the peri-stimulus time histogram for neural spike times. The routine plots the trial averaged spike rate as a function of time.
R = PSTH(TIMES, BINSIZE, FS,NTRIALS,TRIALLEN)
R = PSTH(TIMES, BINSIZE, FS,NTRIALS,TRIALLEN ,AXESHANDLE)
TIMES - spike times (samples)
BINSIZE - binwidth (ms)
FS - sampling rate (hz)
NTRIALS - number of trials
TRIALLEN - length of a trial (samples)
R - spike rate (spikes/s)

Can handle large datasets and uses Matlab's built-in histc function for optimized performance.

An example:
%spike times can be specified in continuous time
%here we have 3 trials and a trial length of 1000 samples
t = [10, 250, 900, 1300, 1600, 2405, 2900];

%the same spike times can also be specified per trial
t2 =[10, 250, 900, 300, 600, 405, 900];
r = psth(t,10,1000,3,1000) ;
r2 = psth(t2,10,1000,3,1000);

引用格式

Rajiv Narayan (2024). Psth (https://www.mathworks.com/matlabcentral/fileexchange/14745-psth), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R13SP1
兼容任何版本
平台兼容性
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