fixed exercise 01 of point processes

This commit is contained in:
2017-11-27 22:25:07 +01:00
parent 4e17882dd5
commit 53c2f92629
12 changed files with 275 additions and 162 deletions

View File

@@ -11,11 +11,11 @@
\usepackage[left=20mm,right=20mm,top=25mm,bottom=25mm]{geometry}
\pagestyle{headandfoot}
\ifprintanswers
\newcommand{\stitle}{: L\"osungen}
\newcommand{\stitle}{: Solutions}
\else
\newcommand{\stitle}{}
\fi
\header{{\bfseries\large Exercise 7\stitle}}{{\bfseries\large Statistics}}{{\bfseries\large 21. November, 2017}}
\header{{\bfseries\large Exercise 7\stitle}}{{\bfseries\large Statistics}}{{\bfseries\large November 21st, 2017}}
\firstpagefooter{Prof. Dr. Jan Benda}{Phone: 29 74573}{Email:
jan.benda@uni-tuebingen.de}
\runningfooter{}{\thepage}{}
@@ -78,8 +78,6 @@ jan.benda@uni-tuebingen.de}
\newcommand{\extra}{--- bonus question ---\ \mbox{}}
\newcommand{\code}[1]{\texttt{#1}}
\graphicspath{{../../pointprocesses/exercises/}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
@@ -182,81 +180,6 @@ With the following questions we want to illustrate the central limit theorem.
\includegraphics[width=0.5\textwidth]{centrallimit-samples}
\end{solution}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\question \qt{Statistics of interspike intervals}
Download the files \code{poisson.mat},
\code{pifou.mat}, and \code{lifadapt.mat} from Ilias.
Each of these files contains several trials of spike trains
of a specific type of neuron. The spike times are measured in seconds.
We want to compare the statistics of the interspike intervals of the
three neurons.
\begin{parts}
\part Load the spike trains from the three files.
Make sure that data are assigned to different variables.
What is the type of the data? How can you access individual spike trains?
How do you access single spike times?
\begin{solution}
\begin{lstlisting}
clear all
% not so good:
load poisson.mat
whos
poissonspikes = spikes;
load pifou.mat;
pifouspikes = spikes;
load lifadapt.mat;
lifadaptspikes = spikes;
clear spikes;
% better:
clear all
x = load('poisson.mat');
poissonspikes = x.spikes;
x = load('pifou.mat');
pifouspikes = x.spikes;
x = load('lifadapt.mat');
lifadaptspikes = x.spikes;
\end{lstlisting}
\end{solution}
\part Write a function that illustrated the spike times of the
first $t_{max}$ seconds in a raster plot. Each spike train is one
row in the raster plot. Each spike is a vertical line at the time
of the spike. Use this function to plot the first second of the
spike rasters of the three neurons.
\begin{solution}
\lstinputlisting{../../pointprocesses/code/spikeraster.m}
\lstinputlisting{../../pointprocesses/code/plotspikeraster.m}
\mbox{}\\[-3ex]
\colorbox{white}{\includegraphics[width=1\textwidth]{spikeraster}}
\end{solution}
\part Write a function that returns a single vector containing the
interspike intervals of aall trials of spike times.
\begin{solution}
\lstinputlisting{../../pointprocesses/code/isis.m}
\end{solution}
\part Write a function that computes and plots an estimate of the
probability density of interspike intervals from a vector of
interspike intervals. The interspike intervals are given in
seconds, but the plot should mark the interspike intervals in
milliseconds. In addition, the function should compute the mean,
the standard deviation and the coefficient of variation
and display them in the plot as well.
Use this and the previous functions to compare the
interspike interval statistics of the three neurons.
\begin{solution}
\lstinputlisting{../../pointprocesses/code/isihist.m}
\lstinputlisting{../../pointprocesses/code/plotisih.m}
\mbox{}\\[-3ex]
\colorbox{white}{\includegraphics[width=1\textwidth]{isihist}}
\end{solution}
\end{parts}
\end{questions}
\end{document}

View File

@@ -1,6 +1,6 @@
\vspace*{-6.5ex}
\vspace*{-7.8ex}
\begin{center}
\textbf{\Large Introduction to scientific computing}\\[1ex]
\textbf{\Large Introduction to Scientific Computing}\\[2.3ex]
{\large Jan Grewe, Jan Benda}\\[-3ex]
Neuroethology lab \hfill --- \hfill Institute for Neurobiology \hfill --- \hfill \includegraphics[width=0.28\textwidth]{UT_WBMW_Black_RGB} \\
Neuroethology Lab \hfill --- \hfill Institute for Neurobiology \hfill --- \hfill \includegraphics[width=0.28\textwidth]{UT_WBMW_Black_RGB} \\
\end{center}