[exercises] scripts and functions update
This commit is contained in:
parent
696167bd39
commit
e32d7f501c
@ -16,7 +16,7 @@
|
|||||||
%%%%% text size %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%% text size %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
\usepackage[left=20mm,right=20mm,top=25mm,bottom=25mm]{geometry}
|
\usepackage[left=20mm,right=20mm,top=25mm,bottom=25mm]{geometry}
|
||||||
\pagestyle{headandfoot}
|
\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:
|
\firstpagefooter{Prof. Jan Benda}{Phone: 29 74 573}{Email:
|
||||||
jan.benda@uni-tuebingen.de}
|
jan.benda@uni-tuebingen.de}
|
||||||
\runningfooter{}{\thepage}{}
|
\runningfooter{}{\thepage}{}
|
||||||
@ -46,7 +46,6 @@
|
|||||||
aboveskip=10pt
|
aboveskip=10pt
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
\newcommand{\code}[1]{\texttt{#1}}
|
\newcommand{\code}[1]{\texttt{#1}}
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
@ -60,7 +59,7 @@
|
|||||||
\end{center}
|
\end{center}
|
||||||
|
|
||||||
The exercises are meant for self-monitoring and revision of the
|
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
|
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
|
but each question needs an individual file. Combine the files into a
|
||||||
single zip archive and submit it via ILIAS. Name the archive according
|
single zip archive and submit it via ILIAS. Name the archive according
|
||||||
@ -108,7 +107,7 @@ to the pattern: ``scripts\_functions\_\{surname\}.zip''.
|
|||||||
|
|
||||||
\part{}
|
\part{}
|
||||||
Improve the function that it takes the duration of the time axis,
|
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
|
calculation should use a temporal stepsize that is 0.01 of the
|
||||||
frequency.
|
frequency.
|
||||||
\begin{solution}
|
\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
|
\question Random Walk. In a 1-D random walk an \emph{agent} walks
|
||||||
randomly either in the one ($+1$) or the other ($-1$)
|
randomly either in the one ($+1$) or the other ($-1$)
|
||||||
direction. With each simulation step one direction is chosen and the
|
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}
|
\begin{parts}
|
||||||
\part{}
|
\part{}
|
||||||
@ -172,7 +172,7 @@ to the pattern: ``scripts\_functions\_\{surname\}.zip''.
|
|||||||
Now we want to know how the probability of $p_{+1}$ (the
|
Now we want to know how the probability of $p_{+1}$ (the
|
||||||
probability to walk into the $+1$ direction) impacts the random
|
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
|
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).
|
stopping the simulations as before).
|
||||||
\begin{solution}
|
\begin{solution}
|
||||||
\lstinputlisting{randomwalkscriptc.m}
|
\lstinputlisting{randomwalkscriptc.m}
|
||||||
|
Reference in New Issue
Block a user