From 1e3ec8944eb1efb95097e98ab4e81351d2afab0e Mon Sep 17 00:00:00 2001 From: Jan Benda Date: Sun, 1 Dec 2019 00:21:07 +0100 Subject: [PATCH] [script] solutions of exercises at end of chapters --- bootstrap/lecture/bootstrap.tex | 4 + chapter.mk | 2 +- debugging/lecture/debugging.tex | 3 + designpattern/lecture/designpattern.tex | 4 + header.tex | 53 ++-- likelihood/lecture/likelihood.tex | 4 + plotting/lecture/plotting.tex | 4 + pointprocesses/lecture/pointprocesses.tex | 4 + .../lecture/pointprocessscetchA.eps | 105 +++---- .../lecture/pointprocessscetchA.pdf | Bin 2791 -> 2778 bytes .../lecture/pointprocessscetchB.eps | 260 ++++++------------ .../lecture/pointprocessscetchB.pdf | Bin 4724 -> 4694 bytes programming/lecture/programming.tex | 7 +- programmingstyle/lecture/programmingstyle.tex | 6 +- regression/lecture/regression.tex | 6 +- regression/lecture/regression_de.tex | 1 - scientificcomputing-script.tex | 1 - statistics/lecture/cumulative.py | 2 +- statistics/lecture/statistics.tex | 4 + 19 files changed, 190 insertions(+), 280 deletions(-) diff --git a/bootstrap/lecture/bootstrap.tex b/bootstrap/lecture/bootstrap.tex index e9e22f8..eba1aac 100644 --- a/bootstrap/lecture/bootstrap.tex +++ b/bootstrap/lecture/bootstrap.tex @@ -191,3 +191,7 @@ Estimate the statistical significance of a correlation coefficient. coefficient computed from the original data. \end{enumerate} \end{exercise} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\printsolutions diff --git a/chapter.mk b/chapter.mk index 494949f..015c9dc 100644 --- a/chapter.mk +++ b/chapter.mk @@ -46,7 +46,7 @@ watchchapter : cleanchapter : cleanpythonplots cleangnuplots rm -f *~ rm -f $(BASENAME).aux $(BASENAME).log - rm -f $(BASENAME)-chapter.aux $(BASENAME)-chapter.log $(BASENAME)-chapter.out $(BASENAME)-chapter.idx + rm -f $(BASENAME)-chapter.aux $(BASENAME)-chapter.log $(BASENAME)-chapter.out $(BASENAME)-chapter.idx $(BASENAME)-chapter-solutions.tex cleanallchapter : cleanchapter diff --git a/debugging/lecture/debugging.tex b/debugging/lecture/debugging.tex index a61c9fb..e7d213e 100644 --- a/debugging/lecture/debugging.tex +++ b/debugging/lecture/debugging.tex @@ -505,3 +505,6 @@ The debugger offers some more (advanced) features but the functionality offered by the basic tools is often enough to debug a program. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%\printsolutions diff --git a/designpattern/lecture/designpattern.tex b/designpattern/lecture/designpattern.tex index 9f97522..1fb191d 100644 --- a/designpattern/lecture/designpattern.tex +++ b/designpattern/lecture/designpattern.tex @@ -168,3 +168,7 @@ x = randi(6, 100, 1); % Some integer-valued data. h = h/sum(h); % Normalize to probability. bar(b, h); % Plot the probabilities. \end{lstlisting} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%\printsolutions diff --git a/header.tex b/header.tex index ae222e3..b208c30 100644 --- a/header.tex +++ b/header.tex @@ -285,7 +285,6 @@ \usepackage{mdframed} \usepackage{xstring} \newlistof{exercisef}{loe}{\tr{Exercises}{\"Ubungen}} -\newcommand{\codepath}{} \DeclareFloatingEnvironment[ fileext=loe, name={\tr{Exercise}{\"Ubung}}, @@ -293,38 +292,44 @@ chapterlistsgaps=on, ]{exercisef} \newboolean{showexercisesolutions} -\setboolean{showexercisesolutions}{false} +\setboolean{showexercisesolutions}{true} +\newwrite\solutions % file descriptor for writing solutions +% we need to know the name of the included file as \currentjobname: +\usepackage{xpatch} +\makeatletter +\def\currentjobname{\jobname}% +\xpretocmd{\include}{\def\currentjobname{#1}\immediate\openout\solutions=\currentjobname-solutions}{}{} +\makeatother +\usepackage{needspace} \newenvironment{exercise}[2]% - { \newcommand{\exercisesource}{#1}% - \newcommand{\exercisefile}{\protect\StrSubstitute{#1}{_}{\_}}% - \newcommand{\exerciseoutput}{#2}% - \setlength{\fboxsep}{2mm}% + { \setlength{\fboxsep}{2mm}% \newcommand{\saveenumi}{\theenumi}\renewcommand{\labelenumi}{(\alph{enumi})}% \captionsetup{singlelinecheck=off,hypcap=false,labelfont={large,sf,it,bf},% font={large,sf,it,bf},skip={0.5ex}}% \begin{mdframed}[linewidth=0pt,backgroundcolor=exerciseback]% - \captionof{exercisef}[\exercisefile]{}% + \captionof{exercisef}[\protect\StrSubstitute{#1}{_}{\_}]{}% \captionsetup{font={normal,sf,it}}% + \immediate\write\solutions{\unexpanded{% + \subsection}[Exercise \thechapter.\arabic{exercisef}]% + {\unexpanded{\needspace{4\baselineskip}}Exercise \thechapter.\arabic{exercisef}}}% + \immediate\write\solutions{\unexpanded{\label}{solution\arabic{exercisef}}}% + \immediate\write\solutions{\unexpanded{\lstinputlisting[belowskip=0ex,aboveskip=0ex,% + nolol=true, title={\textbf{Source code:} \protect\StrSubstitute{#1}{_}{\_}}]}{#1}}% + \ifthenelse{\equal{#2}{}}{}% + {\immediate\write\solutions{\unexpanded{\lstinputlisting[language={},% + nolol=true, title={\textbf{Output:}}, belowskip=0ex, aboveskip=1ex]}{#2}}}% + \immediate\write\solutions{}% }% - { \renewcommand{\theenumi}{\saveenumi}% - \ifthenelse{\boolean{showexercisesolutions}}% - { \hypersetup{hypertexnames=false}% - \ifthenelse{\equal{\exercisesource}{}}{}% - { \addtocounter{lstlisting}{-1}% - \lstinputlisting[belowskip=0pt,aboveskip=1ex,nolol=true,% - title={\textbf{\tr{Solution}{L\"osung}:} \exercisefile}]% - {\codepath\exercisesource}% - \ifthenelse{\equal{\exerciseoutput}{}}{}% - { \addtocounter{lstlisting}{-1}% - \lstinputlisting[language={},title={\textbf{\tr{Output}{Ausgabe}:}},% - nolol=true,belowskip=0pt]% - {\codepath\exerciseoutput}% - }% - }% - \hypersetup{hypertexnames=true}% - }{}% + { \ifthenelse{\boolean{showexercisesolutions}}% + {\hspace*{\fill}\hyperref[solution\arabic{exercisef}]{Solution}}{}% + \renewcommand{\theenumi}{\saveenumi}% \end{mdframed}% } +} +\newcommand{\printsolutions}{\immediate\closeout\solutions% + \ifthenelse{\boolean{showexercisesolutions}}{% + \clearpage\section{Solutions to the exercises}% + \input{\currentjobname-solutions}}{}} \setlength{\cftexercisefindent}{1.2em} \setlength{\cftexercisefnumwidth}{2.6em} diff --git a/likelihood/lecture/likelihood.tex b/likelihood/lecture/likelihood.tex index ec286af..a5c87a7 100644 --- a/likelihood/lecture/likelihood.tex +++ b/likelihood/lecture/likelihood.tex @@ -362,3 +362,7 @@ activity pattern in the population $r_1$, $r_2$, ... $r_n$ is thus \[ {\cal L}(\phi|r_1, r_2, \ldots r_n) = \sum_{i=1}^n \log p_i(r_i|\phi) \] The angle $\phi$ that maximizes this likelihood is then an estimate of the orientation of the edge. + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\printsolutions diff --git a/plotting/lecture/plotting.tex b/plotting/lecture/plotting.tex index 08c8fa0..a9d665b 100644 --- a/plotting/lecture/plotting.tex +++ b/plotting/lecture/plotting.tex @@ -778,3 +778,7 @@ Key ingredients for a good data plot: thicker lines help. \item Error bars wherever they are appropriate. \end{itemize} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%\printsolutions diff --git a/pointprocesses/lecture/pointprocesses.tex b/pointprocesses/lecture/pointprocesses.tex index 824112e..a03f5a8 100644 --- a/pointprocesses/lecture/pointprocesses.tex +++ b/pointprocesses/lecture/pointprocesses.tex @@ -551,3 +551,7 @@ kernel. the same size as the original stimulus contained in file \file{sta\_data.mat}. \end{exercise} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\printsolutions diff --git a/pointprocesses/lecture/pointprocessscetchA.eps b/pointprocesses/lecture/pointprocessscetchA.eps index 67a0c1b..2ff01b6 100644 --- a/pointprocesses/lecture/pointprocessscetchA.eps +++ b/pointprocesses/lecture/pointprocessscetchA.eps @@ -1,7 +1,7 @@ %!PS-Adobe-2.0 EPSF-2.0 %%Title: pointprocessscetchA.tex -%%Creator: gnuplot 5.0 patchlevel 6 -%%CreationDate: Thu Oct 17 14:13:46 2019 +%%Creator: gnuplot 4.6 patchlevel 4 +%%CreationDate: Sat Nov 30 23:19:23 2019 %%DocumentFonts: %%BoundingBox: 50 50 373 135 %%EndComments @@ -18,7 +18,6 @@ gnudict begin /Dashlength 1 def /Landscape false def /Level1 false def -/Level3 false def /Rounded true def /ClipToBoundingBox false def /SuppressPDFMark false def @@ -30,11 +29,11 @@ gnudict begin % /vshift -73 def /dl1 { - 10.0 Dashlength userlinewidth gnulinewidth div mul mul mul + 10.0 Dashlength mul mul Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if } def /dl2 { - 10.0 Dashlength userlinewidth gnulinewidth div mul mul mul + 10.0 Dashlength mul mul Rounded { currentlinewidth 0.75 mul add } if } def /hpt_ 31.5 def @@ -48,7 +47,7 @@ gnudict begin } if } def % -% Gnuplot Prolog Version 5.1 (Oct 2015) +% Gnuplot Prolog Version 4.6 (September 2012) % %/SuppressPDFMark true def % @@ -65,11 +64,11 @@ gnudict begin /vpt2 vpt 2 mul def /hpt2 hpt 2 mul def /Lshow {currentpoint stroke M 0 vshift R - Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def /Rshow {currentpoint stroke M dup stringwidth pop neg vshift R - Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def /Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R - Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def /UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def /DL {Color {setrgbcolor Solid {pop []} if 0 setdash} @@ -83,7 +82,7 @@ gnudict begin /PL {stroke userlinewidth setlinewidth Rounded {1 setlinejoin 1 setlinecap} if} def 3.8 setmiterlimit -% Classic Line colors (version 5.0) +% Default Line colors /LCw {1 1 1} def /LCb {0 0 0} def /LCa {0 0 0} def @@ -96,21 +95,19 @@ gnudict begin /LC6 {0 0 0} def /LC7 {1 0.3 0} def /LC8 {0.5 0.5 0.5} def -% Default dash patterns (version 5.0) -/LTB {BL [] LCb DL} def +% Default Line Types /LTw {PL [] 1 setgray} def -/LTb {PL [] LCb DL} def +/LTb {BL [] LCb DL} def /LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def /LT0 {PL [] LC0 DL} def -/LT1 {PL [2 dl1 3 dl2] LC1 DL} def -/LT2 {PL [1 dl1 1.5 dl2] LC2 DL} def -/LT3 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC3 DL} def -/LT4 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def -/LT5 {PL [4 dl1 2 dl2] LC5 DL} def -/LT6 {PL [1.5 dl1 1.5 dl2 1.5 dl1 1.5 dl2 1.5 dl1 6 dl2] LC6 DL} def -/LT7 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC7 DL} def -/LT8 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC8 DL} def -/SL {[] 0 setdash} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def /Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def /Dia {stroke [] 0 setdash 2 copy vpt add M hpt neg vpt neg V hpt vpt neg V @@ -332,14 +329,9 @@ gnudict begin % /languagelevel where {pop languagelevel} {1} ifelse -dup 2 lt - {/InterpretLevel1 true def - /InterpretLevel3 false def} - {/InterpretLevel1 Level1 def - 2 gt - {/InterpretLevel3 Level3 def} - {/InterpretLevel3 false def} - ifelse } + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} ifelse % % PostScript level 2 pattern fill definitions @@ -428,7 +420,6 @@ Level1 {Level1PatternFill} {Level2PatternFill} ifelse /Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall currentdict end definefont pop -% Level1 SuppressPDFMark or {} { /SDict 10 dict def @@ -438,42 +429,14 @@ systemdict /pdfmark known not { SDict begin [ /Title (pointprocessscetchA.tex) /Subject (gnuplot plot) - /Creator (gnuplot 5.0 patchlevel 6) - /Author (grewe) + /Creator (gnuplot 4.6 patchlevel 4) + /Author (jan) % /Producer (gnuplot) % /Keywords () - /CreationDate (Thu Oct 17 14:13:46 2019) + /CreationDate (Sat Nov 30 23:19:23 2019) /DOCINFO pdfmark end } ifelse -% -% Support for boxed text - Ethan A Merritt May 2005 -% -/InitTextBox { userdict /TBy2 3 -1 roll put userdict /TBx2 3 -1 roll put - userdict /TBy1 3 -1 roll put userdict /TBx1 3 -1 roll put - /Boxing true def } def -/ExtendTextBox { Boxing - { gsave dup false charpath pathbbox - dup TBy2 gt {userdict /TBy2 3 -1 roll put} {pop} ifelse - dup TBx2 gt {userdict /TBx2 3 -1 roll put} {pop} ifelse - dup TBy1 lt {userdict /TBy1 3 -1 roll put} {pop} ifelse - dup TBx1 lt {userdict /TBx1 3 -1 roll put} {pop} ifelse - grestore } if } def -/PopTextBox { newpath TBx1 TBxmargin sub TBy1 TBymargin sub M - TBx1 TBxmargin sub TBy2 TBymargin add L - TBx2 TBxmargin add TBy2 TBymargin add L - TBx2 TBxmargin add TBy1 TBymargin sub L closepath } def -/DrawTextBox { PopTextBox stroke /Boxing false def} def -/FillTextBox { gsave PopTextBox 1 1 1 setrgbcolor fill grestore /Boxing false def} def -0 0 0 0 InitTextBox -/TBxmargin 20 def -/TBymargin 20 def -/Boxing false def -/textshow { ExtendTextBox Gshow } def -% -% redundant definitions for compatibility with prologue.ps older than 5.0.2 -/LTB {BL [] LCb DL} def -/LTb {PL [] LCb DL} def end %%EndProlog %%Page: 1 1 @@ -487,9 +450,10 @@ newpath 2.000 UL LTb LCb setrgbcolor -[] 0 setdash 0.00 0.00 0.00 C 1.000 UP +LTb LCb setrgbcolor +LTb 1.000 UL LTb gsave 6208 824 N 0 -32 V 121 32 V -121 32 V 0 -32 V 1 PolyFill @@ -503,11 +467,9 @@ gsave 6208 824 N 0 -32 V 121 32 V -121 32 V 0 -32 V 1 PolyFill stroke 2.000 UL LTb -0.00 0.00 0.00 C % Begin plot #1 -10.000 UL -LTb -LCb setrgbcolor -[] 0 setdash +0.00 0.00 0.00 C 10.000 UL +LT0 +LC0 setrgbcolor 0.00 0.00 0.00 C 910 573 M 0 503 V 1412 573 M @@ -526,16 +488,11 @@ LCb setrgbcolor 0 503 V 5685 573 M 0 503 V +1.000 UP stroke -LTw -% End plot #1 2.000 UL LTb LCb setrgbcolor -[] 0 setdash -1.000 UP -2.000 UL -LTb 0.00 0.00 0.00 C stroke grestore end diff --git a/pointprocesses/lecture/pointprocessscetchA.pdf b/pointprocesses/lecture/pointprocessscetchA.pdf index cb30829dcdb16889f5152b43117a14c2b0e1229c..031d80537466312365e68359552e3971d13272df 100644 GIT binary patch delta 803 zcmaDZdP{VIN4+B#lOd1mcS~2lfZIz>UJ>SK;y$j-!FS?}Q*1@;a$kwpVO}r)|5x45 z-=mng=J@^BOuGvYykylq`kZA>(y=)l;*2W$;e&ME*)9yKZ;FaN;r|__F zZ+X5f|Nrfi{=JE;U|dz7D!61(_Tfug3S#9J<$CW3qyq{rO)@WSAApRlzxSnd%wvU^w|Ai>gF$Vu^yTU%qacLWr?}m4cBKSl-HbG9RmsfQg=&LP26l zaz;*SS!#}g$z(59H=?ZD%<4guIyp8qqSU3con_8S%-d|q-p}Z6rpcx6T$Gwvl9`|9 zl30?e0rG=iewl)?fdb5X3PuKomOypB`6*x}E><7`LqlT&BV$8Li1+z9%`tr##;FLh zX>tvxp{=O`DAWxU@)Wqh3nipeWVD1rPU~F7jlwfZg1N4M%ZKy?{CVtsiE;~D};*!Lol8U0#G%h0( NV`DB=RabvEE&w;H^UVMN delta 788 zcmca5`doB^N4+=SAp;(l?{=;J0y)nw7cedH(#hy=a8bRY*T8yRy>qS5HjOSL1F-iW$#~7;Jd3?2^3jI@e_nl1_(9Puz2Q+C7I;N2K?hu3$U1 z@y_nAe#`$?tNwkHY0-RTzf+Hf<l5JPh-1w$*ayp`ExURE6eQ#}KPg2a;K zjGWZ6)Eot~$)2okL|M0q)q^N?vTSNZsY_!!%bH%4TAsSujJ==H-CUDP-?=C?u_QA; z&n2-WRRiP;|Kt({Lvsa~2NjGA3@w4`eDhPlN?fc!0)_^L=7uJQ#*hHu;WWqeV=$*8 z#IDKZoQ9fa3ZRfTP{>o@0y7MZj0`N%#SBag%qL&u6b44fQ%-eJ3k-QvV}r?xT*9J; z7&2xC29rIxtmACV4UC*DEG!HyESy~242_ITU0e(e4cy#}T#YPE3@u#j2&;(Yva{nV ZE=epZsVGWK<1#Waw%}4#b@g}S0sto@@>>7^ diff --git a/pointprocesses/lecture/pointprocessscetchB.eps b/pointprocesses/lecture/pointprocessscetchB.eps index a04b551..58a25ce 100644 --- a/pointprocesses/lecture/pointprocessscetchB.eps +++ b/pointprocesses/lecture/pointprocessscetchB.eps @@ -1,7 +1,7 @@ %!PS-Adobe-2.0 EPSF-2.0 %%Title: pointprocessscetchB.tex -%%Creator: gnuplot 5.0 patchlevel 6 -%%CreationDate: Thu Oct 17 14:13:46 2019 +%%Creator: gnuplot 4.6 patchlevel 4 +%%CreationDate: Sat Nov 30 23:19:23 2019 %%DocumentFonts: %%BoundingBox: 50 50 373 237 %%EndComments @@ -18,7 +18,6 @@ gnudict begin /Dashlength 1 def /Landscape false def /Level1 false def -/Level3 false def /Rounded true def /ClipToBoundingBox false def /SuppressPDFMark false def @@ -30,11 +29,11 @@ gnudict begin % /vshift -73 def /dl1 { - 10.0 Dashlength userlinewidth gnulinewidth div mul mul mul + 10.0 Dashlength mul mul Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if } def /dl2 { - 10.0 Dashlength userlinewidth gnulinewidth div mul mul mul + 10.0 Dashlength mul mul Rounded { currentlinewidth 0.75 mul add } if } def /hpt_ 31.5 def @@ -48,7 +47,7 @@ gnudict begin } if } def % -% Gnuplot Prolog Version 5.1 (Oct 2015) +% Gnuplot Prolog Version 4.6 (September 2012) % %/SuppressPDFMark true def % @@ -65,11 +64,11 @@ gnudict begin /vpt2 vpt 2 mul def /hpt2 hpt 2 mul def /Lshow {currentpoint stroke M 0 vshift R - Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def /Rshow {currentpoint stroke M dup stringwidth pop neg vshift R - Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def /Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R - Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def /UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def /DL {Color {setrgbcolor Solid {pop []} if 0 setdash} @@ -83,7 +82,7 @@ gnudict begin /PL {stroke userlinewidth setlinewidth Rounded {1 setlinejoin 1 setlinecap} if} def 3.8 setmiterlimit -% Classic Line colors (version 5.0) +% Default Line colors /LCw {1 1 1} def /LCb {0 0 0} def /LCa {0 0 0} def @@ -96,21 +95,19 @@ gnudict begin /LC6 {0 0 0} def /LC7 {1 0.3 0} def /LC8 {0.5 0.5 0.5} def -% Default dash patterns (version 5.0) -/LTB {BL [] LCb DL} def +% Default Line Types /LTw {PL [] 1 setgray} def -/LTb {PL [] LCb DL} def +/LTb {BL [] LCb DL} def /LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def /LT0 {PL [] LC0 DL} def -/LT1 {PL [2 dl1 3 dl2] LC1 DL} def -/LT2 {PL [1 dl1 1.5 dl2] LC2 DL} def -/LT3 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC3 DL} def -/LT4 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def -/LT5 {PL [4 dl1 2 dl2] LC5 DL} def -/LT6 {PL [1.5 dl1 1.5 dl2 1.5 dl1 1.5 dl2 1.5 dl1 6 dl2] LC6 DL} def -/LT7 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC7 DL} def -/LT8 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC8 DL} def -/SL {[] 0 setdash} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def /Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def /Dia {stroke [] 0 setdash 2 copy vpt add M hpt neg vpt neg V hpt vpt neg V @@ -332,14 +329,9 @@ gnudict begin % /languagelevel where {pop languagelevel} {1} ifelse -dup 2 lt - {/InterpretLevel1 true def - /InterpretLevel3 false def} - {/InterpretLevel1 Level1 def - 2 gt - {/InterpretLevel3 Level3 def} - {/InterpretLevel3 false def} - ifelse } + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} ifelse % % PostScript level 2 pattern fill definitions @@ -428,7 +420,6 @@ Level1 {Level1PatternFill} {Level2PatternFill} ifelse /Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall currentdict end definefont pop -% Level1 SuppressPDFMark or {} { /SDict 10 dict def @@ -438,42 +429,14 @@ systemdict /pdfmark known not { SDict begin [ /Title (pointprocessscetchB.tex) /Subject (gnuplot plot) - /Creator (gnuplot 5.0 patchlevel 6) - /Author (grewe) + /Creator (gnuplot 4.6 patchlevel 4) + /Author (jan) % /Producer (gnuplot) % /Keywords () - /CreationDate (Thu Oct 17 14:13:46 2019) + /CreationDate (Sat Nov 30 23:19:23 2019) /DOCINFO pdfmark end } ifelse -% -% Support for boxed text - Ethan A Merritt May 2005 -% -/InitTextBox { userdict /TBy2 3 -1 roll put userdict /TBx2 3 -1 roll put - userdict /TBy1 3 -1 roll put userdict /TBx1 3 -1 roll put - /Boxing true def } def -/ExtendTextBox { Boxing - { gsave dup false charpath pathbbox - dup TBy2 gt {userdict /TBy2 3 -1 roll put} {pop} ifelse - dup TBx2 gt {userdict /TBx2 3 -1 roll put} {pop} ifelse - dup TBy1 lt {userdict /TBy1 3 -1 roll put} {pop} ifelse - dup TBx1 lt {userdict /TBx1 3 -1 roll put} {pop} ifelse - grestore } if } def -/PopTextBox { newpath TBx1 TBxmargin sub TBy1 TBymargin sub M - TBx1 TBxmargin sub TBy2 TBymargin add L - TBx2 TBxmargin add TBy2 TBymargin add L - TBx2 TBxmargin add TBy1 TBymargin sub L closepath } def -/DrawTextBox { PopTextBox stroke /Boxing false def} def -/FillTextBox { gsave PopTextBox 1 1 1 setrgbcolor fill grestore /Boxing false def} def -0 0 0 0 InitTextBox -/TBxmargin 20 def -/TBymargin 20 def -/Boxing false def -/textshow { ExtendTextBox Gshow } def -% -% redundant definitions for compatibility with prologue.ps older than 5.0.2 -/LTB {BL [] LCb DL} def -/LTb {PL [] LCb DL} def end %%EndProlog %%Page: 1 1 @@ -487,9 +450,10 @@ newpath 2.000 UL LTb LCb setrgbcolor -[] 0 setdash 0.00 0.00 0.00 C 1.000 UP +LTb LCb setrgbcolor +LTb 1.000 UL LTb gsave 6208 3165 N 0 -32 V 121 32 V -121 32 V 0 -32 V 1 PolyFill @@ -503,11 +467,9 @@ gsave 6208 3165 N 0 -32 V 121 32 V -121 32 V 0 -32 V 1 PolyFill stroke 2.000 UL LTb -0.00 0.00 0.00 C % Begin plot #1 -10.000 UL -LTb -LCb setrgbcolor -[] 0 setdash +0.00 0.00 0.00 C 10.000 UL +LT0 +LC0 setrgbcolor 0.00 0.00 0.00 C 910 3029 M 0 272 V 502 -272 R @@ -526,22 +488,18 @@ LCb setrgbcolor 0 272 V 5685 3029 M 0 272 V +1.000 UP stroke -LTw -% End plot #1 2.000 UL LTb LCb setrgbcolor -[] 0 setdash -1.000 UP -2.000 UL -LTb 0.00 0.00 0.00 C 2.000 UL LTb LCb setrgbcolor -[] 0 setdash 0.00 0.00 0.00 C 1.000 UP +LTb LCb setrgbcolor +LTb 1.000 UL LTb gsave 6208 2043 N 0 -32 V 121 32 V -121 32 V 0 -32 V 1 PolyFill @@ -552,86 +510,76 @@ gsave 6208 2043 N 0 -32 V 121 32 V -121 32 V 0 -32 V 1 PolyFill 0 -32 V -5680 0 R 5680 0 V -stroke 1291 1929 M 121 32 V -121 32 V --260 0 R -910 1961 L -121 -32 V --121 32 R +-260 -64 R +-121 32 V +121 32 V +910 1961 M 502 0 V -stroke -2002 1929 M +590 -32 R 121 32 V -121 32 V --469 0 R --121 -32 V -121 -32 V --121 32 R +-469 -64 R +-121 32 V +121 32 V +-121 -32 R 711 0 V -stroke -2329 1939 M +206 -22 R 84 22 V -84 22 V --122 0 R --84 -22 V -84 -22 V --84 22 R +-122 -44 R +-84 22 V +84 22 V +-84 -22 R 290 0 V -stroke -2629 1938 M +216 -23 R 88 23 V -88 23 V --128 0 R --88 -23 V -88 -23 V --88 23 R +-128 -46 R +-88 23 V +88 23 V +-88 -23 R 304 0 V -stroke -3046 1929 M +329 -32 R 121 32 V -121 32 V --208 0 R --121 -32 V -121 -32 V --121 32 R +-208 -64 R +-121 32 V +121 32 V +-121 -32 R 450 0 V -stroke -3912 1929 M +745 -32 R 121 32 V -121 32 V --624 0 R --121 -32 V -121 -32 V --121 32 R +-624 -64 R +-121 32 V +121 32 V +-121 -32 R 866 0 V -stroke -4529 1929 M +496 -32 R 121 32 V -121 32 V --375 0 R --121 -32 V -121 -32 V --121 32 R +-375 -64 R +-121 32 V +121 32 V +-121 -32 R 617 0 V -stroke -5564 1929 M +914 -32 R 121 32 V -121 32 V --793 0 R --121 -32 V -121 -32 V --121 32 R +-793 -64 R +-121 32 V +121 32 V +-121 -32 R 1035 0 V stroke 2.000 UL LTb -0.00 0.00 0.00 C % Begin plot #1 -10.000 UL -LTb -LCb setrgbcolor -[] 0 setdash +0.00 0.00 0.00 C 10.000 UL +LT0 +LC0 setrgbcolor 0.00 0.00 0.00 C 910 1907 M 0 272 V 502 -272 R @@ -650,60 +598,47 @@ LCb setrgbcolor 0 272 V 5685 1907 M 0 272 V +1.000 UP stroke -LTw -% End plot #1 2.000 UL LTb LCb setrgbcolor -[] 0 setdash -1.000 UP -2.000 UL -LTb 0.00 0.00 0.00 C 2.000 UL LTb LCb setrgbcolor -[] 0 setdash 0.00 0.00 0.00 C 528 268 M -63 0 V stroke LTb LCb setrgbcolor -[] 0 setdash 0.00 0.00 0.00 C 528 460 M -63 0 V stroke LTb LCb setrgbcolor -[] 0 setdash 0.00 0.00 0.00 C 528 652 M -63 0 V stroke LTb LCb setrgbcolor -[] 0 setdash 0.00 0.00 0.00 C 528 844 M -63 0 V stroke LTb LCb setrgbcolor -[] 0 setdash 0.00 0.00 0.00 C 528 1036 M -63 0 V stroke LTb LCb setrgbcolor -[] 0 setdash 0.00 0.00 0.00 C 528 1228 M -63 0 V stroke LTb LCb setrgbcolor -[] 0 setdash 0.00 0.00 0.00 C 2.000 UL LTb LCb setrgbcolor -[] 0 setdash 0.00 0.00 0.00 C 528 1276 M 528 220 L 5801 0 R @@ -711,7 +646,9 @@ LCb setrgbcolor -5801 0 R 1.000 UP stroke +LTb LCb setrgbcolor +LTb 1.000 UL LTb gsave 6208 268 N 0 -32 V 121 32 V -121 32 V 0 -32 V 1 PolyFill @@ -725,11 +662,9 @@ gsave 6208 268 N 0 -32 V 121 32 V -121 32 V 0 -32 V 1 PolyFill stroke 2.000 UL LTb -0.00 0.00 0.00 C % Begin plot #1 -3.000 UL -LTb -LCb setrgbcolor -[] 0 setdash +0.00 0.00 0.00 C 3.000 UL +LT0 +LC0 setrgbcolor 0.00 0.00 0.00 C 528 268 M 382 0 V 0 96 R @@ -750,15 +685,11 @@ LCb setrgbcolor 1035 0 V 0 96 R 533 0 V -stroke -LTw -% End plot #1 -% Begin plot #2 1.500 UP +stroke 2.000 UL -LTb -LCb setrgbcolor -[] 0 setdash +LT0 +LC0 setrgbcolor 0.00 0.00 0.00 C 910 268 CircleF 1412 364 CircleF 2123 460 CircleF @@ -768,14 +699,10 @@ LCb setrgbcolor 4033 844 CircleF 4650 940 CircleF 5685 1036 CircleF -LTw -% End plot #2 -% Begin plot #3 1.000 UP 2.000 UL -LTb -LCb setrgbcolor -[] 0 setdash +LT0 +LC0 setrgbcolor 1.00 1.00 1.00 C 910 268 CircleF 1412 364 CircleF 2123 460 CircleF @@ -785,14 +712,10 @@ LCb setrgbcolor 4033 844 CircleF 4650 940 CircleF 5685 1036 CircleF -LTw -% End plot #3 -% Begin plot #4 1.500 UP 2.000 UL -LTb -LCb setrgbcolor -[] 0 setdash +LT0 +LC0 setrgbcolor 0.00 0.00 0.00 C 910 364 CircleF 1412 460 CircleF 2123 556 CircleF @@ -802,15 +725,10 @@ LCb setrgbcolor 4033 940 CircleF 4650 1036 CircleF 5685 1132 CircleF -LTw -% End plot #4 -2.000 UL -LTb -LCb setrgbcolor -[] 0 setdash 1.000 UP 2.000 UL LTb +LCb setrgbcolor 0.00 0.00 0.00 C stroke grestore end diff --git a/pointprocesses/lecture/pointprocessscetchB.pdf b/pointprocesses/lecture/pointprocessscetchB.pdf index 3b50deca3aaff74af1c8dfca2e74f9f81d0ac4cd..2517ae1107795b4ba5aacb0bfc11514643de6d93 100644 GIT binary patch delta 2727 zcmb7?X*|^J8pkokW3tSMvYYH-_>UPgL$=8vl(om&f{duKJjN1XEQKgWGY^tb8YK;C zEHT#8A`*=(5r(2LMfNS6bk2EmdT~1Ui~Dnbe)sQpUHA9;+>6S6$`l(iMr5eTsebSH zq|SsOKQMZE*izk78u)VAD6MwO-e*_I!`u;}s}@D#A1rD3RH@mnh`RYhU&*T*bFEy3 zrp}cWa#QH?X8(%I>yif2>51uClav>bMOGo(hi7V*Hp0bIHo3i=?a1Eq4dmE~6}$Ou zjMhBYWV_nDeRZ1uP7t~LF~~25)qYG*{A&JjuVSd!ZrV6%J}d{ys=qr&0kP_rmv;8@ zbqdJolw<6wT6iS<-to*=&YGegp6yLzIgV|ux9L3!XM-H`!yhc*DPsxSszFiIf+17X zV0c8vlah;crx1@1i_z0xS;g|oZ}zmkz4`3cux!K@t)-=he01|PFYd5WcJ$I&OH#&0 zM`2g@Ay9FY205JIs8P^eo`3#DU1oLxA%ZR2e<}Whni>T+M~PV)u(^h;G93eNB!pxteaE2v3Hmk+KinOJUqSksF+bvF! z%EW9RRu|}!4N6M40pR6{D%nz_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Y|s3tMRPz&J*8DlzBb)1jn#P3BE=w~HaC)9da*L$b!SjnuQz-z|n7 z!Ih5Yg)#IYRn`G|#If?oV*Q5qCoQaLnOcZvB-ZpPYi|gVd=EC8@w^V{lpVepnq1ZX+P2uN+YI#POaFGUFx?ew z{}q3S+-O+WMVeEeYm@`D%t}z`K6~)9oM1_e+?Q9Q8X^#rt6*kPAUGr`Wi>hQ_tkxY z@O9}?hzNeUQNWw0Xr66S4ehHCmfYnAW()kTtf;^=8KGjp$9k135xpwts@Jw75ypU+ zAw__j?9q~)V$8G@J2}BSPMNa9HuWV}l1+o4=^A8em%GyYT+Q)4Hll6a6ARGYH5c5H zzCbh@q4H>UrMzO{$-VDu2D;#Iv;)1P=LrBN1?PJ$YXo5QwVZ*>40?MG#O3l#d=3hQwY*!w`te z7#Mu-z%V{YEbmG? zkr0@z4~ztHMCj>55c+?=>+5DEife;0C*Y9qOC%rvU_ulj7^0iiB5wI}^VC77)P5#~ zx=z-VxXRCIvOxVpeni4mLVcygU7)I-rl^kD-a1JEVWH-iNCb`VQEYuk5QHA&zbUgk zz_Q|SgdPHoK>d@M0@nL6RyX+QKgwA=Fx(i2gM8mM91;o<{kwpp5oqN9Vn`Gk{sV@D zRMP} mPMVoxjSc@V!$Z{ASTurkiAcIeBwQBV(?Ezqp%%85qW=L_W%I27 diff --git a/programming/lecture/programming.tex b/programming/lecture/programming.tex index e94ff6c..417b92e 100644 --- a/programming/lecture/programming.tex +++ b/programming/lecture/programming.tex @@ -1,5 +1,6 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\chapter{Programming in \matlab}\label{programming} +\chapter{Programming in \matlab} +\label{programming} In this chapter we will cover the basics of programming in \matlab{}. Starting with the concept of simple variables and data @@ -1768,3 +1769,7 @@ legend('show') duplication or it grows too large, it is high time to consider extracting features into separate functions. \end{ibox} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\printsolutions diff --git a/programmingstyle/lecture/programmingstyle.tex b/programmingstyle/lecture/programmingstyle.tex index 558d5d6..0542e65 100644 --- a/programmingstyle/lecture/programmingstyle.tex +++ b/programmingstyle/lecture/programmingstyle.tex @@ -4,7 +4,6 @@ more months might as well have been written by someone else.}{Eagleson's law} -%\selectlanguage{ngerman} Cultivating a good code style is not just a matter of good taste but rather is a key ingredient for readability and maintainability of code and, in the end, facilitates reproducibility of scientific @@ -36,7 +35,7 @@ of the program but two questions remain: (i) How to organize the files on the file system and (ii) how to name them that the controlling script is easily identified among the other \codeterm{m-files}. -Upon installation ``MATLAB'' creates a folder called \file{MATLAB} in +Upon installation \matlab{} creates a folder called \file{MATLAB} in the user space (Windows: My files, Linux: Documents, MacOS: Documents). Since this folder is already appended to the Matlab search path (Box~\ref{matlabpathbox}), it is easiest to stick to it for the @@ -427,4 +426,5 @@ readability and comprehensibility pays off, even to the author! Johnson} -\selectlanguage{english} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%\printsolutions diff --git a/regression/lecture/regression.tex b/regression/lecture/regression.tex index c60b926..762e432 100644 --- a/regression/lecture/regression.tex +++ b/regression/lecture/regression.tex @@ -1,6 +1,5 @@ \chapter{\tr{Optimization and gradient descent}{Optimierung und Gradientenabstieg}} -% \selectlanguage{ngerman} To understand the behaviour of a given system sciences often probe the system with input signals and then try to explain the responses through a model. Typically the model has a few parameter that specify @@ -356,7 +355,6 @@ large. iteration of the algorithm.} \label{gradientdescentfig} \end{figure} -\setboolean{showexercisesolutions}{false} \begin{exercise}{gradientDescent.m}{} Implement the gradient descent for the problem of the linear equation for the measured data in file \file{lin\_regression.mat}. @@ -407,4 +405,6 @@ designed for optimizations in the least square error sense parameter increases complexity and is computationally expensive. \end{important} -\selectlanguage{english} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\printsolutions diff --git a/regression/lecture/regression_de.tex b/regression/lecture/regression_de.tex index f72a406..fe86f41 100644 --- a/regression/lecture/regression_de.tex +++ b/regression/lecture/regression_de.tex @@ -368,7 +368,6 @@ Punkte in Abbildung \ref{gradientdescentfig} gro{\ss}. Optimierungsschritt an.} \label{gradientdescentfig} \end{figure} -\setboolean{showexercisesolutions}{false} \begin{exercise}{gradientDescent.m}{} Implementiere den Gradientenabstieg f\"ur das Problem der Parameteranpassung der linearen Geradengleichung an die Messdaten in diff --git a/scientificcomputing-script.tex b/scientificcomputing-script.tex index 03d8c8e..1e5fb9d 100644 --- a/scientificcomputing-script.tex +++ b/scientificcomputing-script.tex @@ -67,7 +67,6 @@ \lstset{inputpath=regression/code} \include{regression/lecture/regression} -\setboolean{showexercisesolutions}{false} \graphicspath{{likelihood/lecture/}{likelihood/lecture/figures/}} \lstset{inputpath=likelihood/code} \include{likelihood/lecture/likelihood} diff --git a/statistics/lecture/cumulative.py b/statistics/lecture/cumulative.py index 7c74035..a1cc849 100644 --- a/statistics/lecture/cumulative.py +++ b/statistics/lecture/cumulative.py @@ -15,7 +15,7 @@ gausscdf = np.cumsum(gauss)*dx # plot: plt.xkcd() -fig = plt.figure( figsize=(6, 2.6) ) +fig = plt.figure( figsize=(6, 2.4) ) ax = fig.add_subplot(1, 1, 1) ax.spines['right'].set_visible(False) ax.spines['top'].set_visible(False) diff --git a/statistics/lecture/statistics.tex b/statistics/lecture/statistics.tex index 583f757..319cec3 100644 --- a/statistics/lecture/statistics.tex +++ b/statistics/lecture/statistics.tex @@ -500,3 +500,7 @@ insufficiently or not at all detected by the correlation coefficient coefficients close to zero. $\xi$ denote normally distributed random numbers.} \end{figure} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\printsolutions