diff --git a/programming/exercises/scripts_functions.tex b/programming/exercises/scripts_functions.tex index 652a88c..2b3282a 100644 --- a/programming/exercises/scripts_functions.tex +++ b/programming/exercises/scripts_functions.tex @@ -16,7 +16,7 @@ %%%%% text size %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage[left=20mm,right=20mm,top=25mm,bottom=25mm]{geometry} \pagestyle{headandfoot} -\header{{\bfseries\large \"Ubung 5}}{{\bfseries\large Scripts and functions}}{{\bfseries\large 07. November, 2017}} +\header{{\bfseries\large Exercise 6}}{{\bfseries\large Scripts and functions}}{{\bfseries\large 06. November, 2018}} \firstpagefooter{Prof. Jan Benda}{Phone: 29 74 573}{Email: jan.benda@uni-tuebingen.de} \runningfooter{}{\thepage}{} @@ -46,7 +46,6 @@ aboveskip=10pt } - \newcommand{\code}[1]{\texttt{#1}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -60,7 +59,7 @@ \end{center} The exercises are meant for self-monitoring and revision of the -lecture topic. You should try to solve them on your own. In contrast +lecture. You should try to solve them on your own. In contrast to previous exercises, the solutions can not be saved in a single file but each question needs an individual file. Combine the files into a single zip archive and submit it via ILIAS. Name the archive according @@ -108,7 +107,7 @@ to the pattern: ``scripts\_functions\_\{surname\}.zip''. \part{} Improve the function that it takes the duration of the time axis, - the amplitude and the frequency as input arguments. The + the amplitude, and the frequency as input arguments. The calculation should use a temporal stepsize that is 0.01 of the frequency. \begin{solution} @@ -144,7 +143,8 @@ to the pattern: ``scripts\_functions\_\{surname\}.zip''. \question Random Walk. In a 1-D random walk an \emph{agent} walks randomly either in the one ($+1$) or the other ($-1$) direction. With each simulation step one direction is chosen and the - position is updated accordingly. + position is updated accordingly. \textbf{There are some differences + to the solution discussed in the lecture!} \begin{parts} \part{} @@ -172,7 +172,7 @@ to the pattern: ``scripts\_functions\_\{surname\}.zip''. Now we want to know how the probability of $p_{+1}$ (the probability to walk into the $+1$ direction) impacts the random walk. Vary $p_{+1}$ in the range $0.5 \le p_{+1} < 0.8$. Do 10 - random walks for four probabilities (apply the same thresholds for + random walks for the four probabilities (apply the same thresholds for stopping the simulations as before). \begin{solution} \lstinputlisting{randomwalkscriptc.m}