\documentclass[addpoints,11pt]{exam}
\usepackage{url}
\usepackage{color}
\usepackage{hyperref}

\pagestyle{headandfoot}
\runningheadrule
\firstpageheadrule
\firstpageheader{Scientific Computing}{Project Assignment}{11/02/2014
  -- 11/05/2014}
%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014}
\firstpagefooter{}{}{{\bf Supervisor:} Jan Benda}
\runningfooter{}{}{}
\pointsinmargin
\bracketedpoints

%\printanswers
%\shadedsolutions

%%%%% listings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{listings}
\lstset{
 basicstyle=\ttfamily,
 numbers=left,
 showstringspaces=false,
 language=Matlab,
 breaklines=true,
 breakautoindent=true,
 columns=flexible,
 frame=single,
% captionpos=t,
 xleftmargin=2em,
 xrightmargin=1em,
% aboveskip=11pt,
 %title=\lstname,
% title={\protect\filename@parse{\lstname}\protect\filename@base.\protect\filename@ext}
 }


\begin{document}
%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%%
\sffamily
% \begin{flushright}
% \gradetable[h][questions]
% \end{flushright}

\begin{center}
  \input{../disclaimer.tex}
\end{center}

%%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%%

\begin{questions}
  \question You are recording the activity of a neuron in response to
  constant stimuli of intensity $I$ (think of that, for example,
  as a current $I$ injected via a patch-electrode into the neuron).

  Measure the tuning curve (also called the intensity-response curve) of the
  neuron.  That is, what is the firing rate of the neuron's response
  as a function of the input $I$. How does this depend on the level of
  the intrinsic noise of the neuron?

  The neuron is implemented in the file \texttt{lifspikes.m}.  Call it
  with the following parameters:
    \begin{lstlisting}
trials = 10;
tmax = 50.0;
input = 10.0;  % the input I
Dnoise = 1.0;  % noise strength

spikes = lifspikes( trials, input, tmax, Dnoise );
    \end{lstlisting}
    The returned \texttt{spikes} is a cell array with \texttt{trials} elements, each being a vector
    of spike times (in seconds) computed for a duration of \texttt{tmax} seconds.
    The input is set via the \texttt{input} variable, the noise strength via \texttt{Dnoise}.

  \begin{parts}
    \part First set the noise \texttt{Dnoise=0} (no noise). Compute and plot the firing rate
    as a function of the input for inputs ranging from 0 to 20.

    \part Do the same for various noise strength \texttt{Dnoise}. Use $D_{noise} = 1e-3$,
    1e-2, and 1e-1. How does the intrinsic noise influence the response curve?

    \part Show some interspike interval histograms for some
    interesting values of the input and the noise strength.

    \part How does the coefficient of variation $CV_{isi}$ (standard
    deviation divided by mean) of the interspike intervalls depend on
    the input and the noise level?
    

 \end{parts}

\end{questions}

\end{document}
