diff options
author | LordMcFungus <mceagle117@gmail.com> | 2021-03-22 18:05:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-22 18:05:11 +0100 |
commit | 76d2d77ddb2bed6b7c6b8ec56648d85da4103ab7 (patch) | |
tree | 11b2d41955ee4bfa0ae5873307c143f6b4d55d26 /buch/chapters/80-wahrscheinlichkeit/images/markov.tex | |
parent | more chapter structure (diff) | |
parent | add title image (diff) | |
download | SeminarMatrizen-76d2d77ddb2bed6b7c6b8ec56648d85da4103ab7.tar.gz SeminarMatrizen-76d2d77ddb2bed6b7c6b8ec56648d85da4103ab7.zip |
Merge pull request #1 from AndreasFMueller/master
update
Diffstat (limited to 'buch/chapters/80-wahrscheinlichkeit/images/markov.tex')
-rw-r--r-- | buch/chapters/80-wahrscheinlichkeit/images/markov.tex | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/buch/chapters/80-wahrscheinlichkeit/images/markov.tex b/buch/chapters/80-wahrscheinlichkeit/images/markov.tex new file mode 100644 index 0000000..72f3b85 --- /dev/null +++ b/buch/chapters/80-wahrscheinlichkeit/images/markov.tex @@ -0,0 +1,99 @@ +% +% markov2.tex -- template for standalon tikz images +% +% (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule +% +\documentclass[tikz]{standalone} +\usepackage{amsmath} +\usepackage{times} +\usepackage{txfonts} +\usepackage{pgfplots} +\usepackage{csvsimple} +\usetikzlibrary{arrows,intersections,math} +\begin{document} +\def\skala{1} +\begin{tikzpicture}[>=latex,thick,scale=\skala] + +\def\punkt#1#2#3{ + \fill[color=white] #1 circle[radius=0.10]; + \fill[color=#2] #1 circle[radius=0.13]; + \node[color=white] at #1 {$\scriptstyle #3$}; +} + +\def\xs{2.5} +\def\ys{1} + +\foreach \x in {0,...,5}{ + \draw[color=red,line width=0.5pt] + ({\x*\xs},{-0.7*\ys}) -- ({\x*\xs},{-6.5*\ys}); +} + +\def\dotradius{0.04} + +\def\dotrow#1#2{ + \punkt{({#1*\xs},{-1*\ys})}{#2}{1} + \punkt{({#1*\xs},{-2*\ys})}{#2}{2} + \punkt{({#1*\xs},{-3*\ys})}{#2}{3} + \punkt{({#1*\xs},{-4*\ys})}{#2}{4} + \fill[color=#2] ({#1*\xs},{-5*\ys-0.3}) circle[radius=\dotradius]; + \fill[color=#2] ({#1*\xs},{-5*\ys-0.15}) circle[radius=\dotradius]; + \fill[color=#2] ({#1*\xs},{-5*\ys}) circle[radius=\dotradius]; + \fill[color=#2] ({#1*\xs},{-5*\ys+0.15}) circle[radius=\dotradius]; + \fill[color=#2] ({#1*\xs},{-5*\ys+0.3}) circle[radius=\dotradius]; + \punkt{({#1*\xs},{-6*\ys})}{#2}{s} +} + +\def\fan#1#2{ + \foreach \x in {1,2,3,4,6}{ + \foreach \y in {1,2,3,4,6}{ + \draw[->,shorten >= 2mm,shorten <= 2mm,color=#2] + ({#1*\xs},{-\x*\ys}) + -- + ({(#1+1)*\xs},{-\y*\ys}); + } + } +} + +\begin{scope} +\clip (-0.5,{-6.5*\ys}) rectangle ({5*\xs+0.5},-0.5); +\fan{-1}{gray} +\fan{0}{gray} +\fan{1}{gray} +\fan{2}{black} +\fan{3}{gray} +\fan{4}{gray} +\fan{5}{gray} +\end{scope} + +\dotrow{0}{gray} +\dotrow{1}{gray} +\dotrow{2}{black} +\dotrow{3}{black} +\dotrow{4}{gray} +\dotrow{5}{gray} + +\def\ty{-0.5} +\node[color=gray] at ({0.5*\xs},{\ty*\ys}) {$T(n-1,n-2)$}; +\node[color=gray] at ({1.5*\xs},{\ty*\ys}) {$T(n,n-1)$}; +\node[color=black] at ({2.5*\xs},{\ty*\ys}) {$T(n+1,n)$}; +\node[color=gray] at ({3.5*\xs},{\ty*\ys}) {$T(n+2,n+1)$}; +\node[color=gray] at ({4.5*\xs},{\ty*\ys}) {$T(n+3,n+2)$}; + +\draw[->,color=red] (-0.7,{-6.5*\ys}) -- ({5*\xs+0.7},{-6.5*\ys}) coordinate[label={$t$}]; + +\foreach \x in {0,...,5}{ + \draw[color=red] + ({\x*\xs},{-6.5*\ys-0.05}) + -- + ({\x*\xs},{-6.5*\ys+0.05}); +} +\node[color=red] at ({0*\xs},{-6.5*\ys}) [below] {$n-2\mathstrut$}; +\node[color=red] at ({1*\xs},{-6.5*\ys}) [below] {$n-1\mathstrut$}; +\node[color=red] at ({2*\xs},{-6.5*\ys}) [below] {$n\mathstrut$}; +\node[color=red] at ({3*\xs},{-6.5*\ys}) [below] {$n+1\mathstrut$}; +\node[color=red] at ({4*\xs},{-6.5*\ys}) [below] {$n+2\mathstrut$}; +\node[color=red] at ({5*\xs},{-6.5*\ys}) [below] {$n+3\mathstrut$}; + +\end{tikzpicture} +\end{document} + |