Code covered by the BSD License  

Highlights from
Psth

Be the first to rate this file! 16 Downloads (last 30 days) File Size: 1.69 KB File ID: #14745
image thumbnail

Psth

by Rajiv Narayan

 

23 Apr 2007 (Updated 23 Apr 2007)

Computes the peri-stimulus time histogram for neural spike times

| Watch this File

File Information
Description

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);

MATLAB release MATLAB 6.5.1 (R13SP1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
specialized Rajiv Narayan 22 Oct 2008 09:10:11
plotting Rajiv Narayan 22 Oct 2008 09:10:11
psth Rajiv Narayan 22 Oct 2008 09:10:11
peristimulus time histogram Rajiv Narayan 22 Oct 2008 09:10:11
rasterplot Rajiv Narayan 22 Oct 2008 09:10:11
neural Rajiv Narayan 22 Oct 2008 09:10:11
spike times Rajiv Narayan 22 Oct 2008 09:10:11
neural Freud Xue 13 Apr 2010 10:09:48
peristimulus time histogram Freud Xue 13 Apr 2010 10:10:40

Contact us at files@mathworks.com