[pointprocesses] improved code

This commit is contained in:
Jan Benda 2020-12-07 22:51:10 +01:00
parent 430bdfb7fd
commit e2f026c53f
7 changed files with 34 additions and 35 deletions

View File

@ -10,14 +10,13 @@ function [time, rate] = convolution_rate(spikes, sigma, dt, t_max)
% t_max : the trial duration in seconds.
%
% Returns:
two vectors containing the time and the rate.
% two vectors containing the time and the rate.
time = 0:dt:t_max - dt;
rate = zeros(size(time));
spike_indices = round(spikes / dt);
rate(spike_indices) = 1;
kernel = gaussKernel(sigma, dt);
rate = conv(rate, kernel, 'same');
end

View File

@ -25,9 +25,9 @@
\item Multitrial firing rates
\item Better explain difference between ISI method and PSTHes. The
latter is dependent on precision of spike times the former not.
\item Choice of bin width for PSTH, kernel width, also in relation sto
\item Choice of bin width for PSTH, kernel width, also in relation to
stimulus time scale
\item Kernle firing rate: discuss different kernel shapes, in
\item Kernel firing rate: discuss different kernel shapes, in
particular causal kernels (gamma, exponential), relation to synaptic
potentials
\end{itemize}