Be the first to rate this file! 14 downloads (last 30 days) File Size: 2.33 KB File ID: #23435

SDFConv

by Matthew Nelson

 

25 Mar 2009

Code covered by the BSD License  

Given spike times across trials, create smoothed peri-event hist convolved with a PSP or Gaus kernel

Download Now | Watch this File

File Information
Description

% function sdf=SDFConv(spk,AlignEv,bn,ktype,sig)
%
% Inputs:
% SPK: = SPK is a 2D numeric array with the timestamp (in ms) for each
% spike in each trial down the other. SPK is assumed to be
% Nan-padded so that it's width is equal to the maximum number of
% spikes in one trial.
% ALIGNEV: = A vector of the time of the Align event in each trial. The
% program converts it to a column vector if it isn't already.
% Defaults to all zeros (assuming the input is already
% aligned)
% BN: = The time bin around the Align event you you would like
% to analyze. In form [starttime endtime]. Defaults to [-300 800]
% *Note that the effects from spikes from before bn(1) are
% included in the smoothed histogram, i.e. sdf, (including
% effects from spikes up to the kernel's half-width before
% bn(1)), though the time is not included in the output of the
% smoothed histogram
% KTYPE: = The type of kernel to use. 1 for PSP kernel, 2 for Gaussian
% kernel. Defaults to 1
% For an explanation of the PSP kernel, see:
% Thompson KG, Hanes DP, Bichot NP and Schall JD (1996).
% Perceptual and motor processing stages identified in the
% activity of macaque frontal eye field neurons during visual
% search. Journal of Neurophysiology. 76:4040-4055.
%
% SIG: = If using a gaussian kernel, this is the value of sigma (i.e.
% the std of the kernel) in units of ms. Defaults to 30
%
% OUTPUTS
% SDF: = The smoothed histogram
%
% Note- this doesn't require a for loop, and such easy translation into
% histograms is the main advantage to storing spikes in a 2D trials array
% padded with Nans, which is why it was determined to store spikes in that
% way.
%
% By Matt Nelson

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Align repeated trials of analog data to a variable event

MATLAB release MATLAB 7.7 (R2008b)
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
neuroscience Matthew Nelson 27 Mar 2009 14:43:06
histogram Matthew Nelson 27 Mar 2009 14:43:06
spike Matthew Nelson 27 Mar 2009 14:43:06
spike train Matthew Nelson 27 Mar 2009 14:43:06
convolve Matthew Nelson 27 Mar 2009 14:43:06
smoothed histogram Matthew Nelson 27 Mar 2009 14:43:06
sdf Matthew Nelson 27 Mar 2009 14:43:06
density function Matthew Nelson 27 Mar 2009 14:43:06
psp Matthew Nelson 27 Mar 2009 14:43:06
postsynaptic potential Matthew Nelson 27 Mar 2009 14:43:06
filter Matthew Nelson 27 Mar 2009 14:43:06
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com