[pointprocesses] fixed spike count exercise
This commit is contained in:
parent
1fbb04860d
commit
5e9ff32cd3
@ -158,20 +158,25 @@
|
|||||||
\question \qt{Statistics of spike counts}
|
\question \qt{Statistics of spike counts}
|
||||||
Now let's have a look at the statistics of the spike counts.
|
Now let's have a look at the statistics of the spike counts.
|
||||||
\begin{parts}
|
\begin{parts}
|
||||||
\part Write a function that counts and returns a vector with the
|
\part \label{counts} Write a function that counts with the number
|
||||||
number of spikes in windows of a given width $W$.
|
of spikes in windows of a given width $W$. The spikes are passed
|
||||||
|
to the function as a cell array containing vectors of spike times.
|
||||||
|
The function returns a single vector with all the spike counts.
|
||||||
|
\begin{solution}
|
||||||
|
\lstinputlisting{counts.m}
|
||||||
|
\end{solution}
|
||||||
|
|
||||||
Use this function to generate a properly normalized histogram of
|
\part Generate a properly normalized histogram of spike counts for
|
||||||
spike counts for the data of the three types of neurons. Use
|
the data of the three types of neurons. Use 100\,ms for the window
|
||||||
100\,ms for the window width.
|
width and the function from (\ref{counts}) for computing the spike
|
||||||
|
counts.
|
||||||
|
|
||||||
Compare the distributions with the Poisson distribution expected
|
In addition, compare the distributions with the Poisson
|
||||||
for a Poisson spike train:
|
distribution expected for a Poisson spike train:
|
||||||
\[ P(k) = \frac{(\lambda W)^ke^{\lambda W}}{k!} \; , \] where
|
\[ P(k) = \frac{(\lambda W)^ke^{\lambda W}}{k!} \; , \] where
|
||||||
$\lambda$ is the rate of the spike train that you should estimate
|
$\lambda$ is the rate of the spike train that you should estimate
|
||||||
from the data.
|
from the data.
|
||||||
\begin{solution}
|
\begin{solution}
|
||||||
\lstinputlisting{counts.m}
|
|
||||||
\newsolutionpage
|
\newsolutionpage
|
||||||
\lstinputlisting{spikecountshists.m}
|
\lstinputlisting{spikecountshists.m}
|
||||||
\colorbox{white}{\includegraphics[width=1\textwidth]{spikecountshists}}
|
\colorbox{white}{\includegraphics[width=1\textwidth]{spikecountshists}}
|
||||||
|
Reference in New Issue
Block a user