Graphics, Figures & Tables ⇒ markov chain
-
manishkumar
- Posts: 1
- Joined: Thu Mar 18, 2021 7:09 pm
markov chain
- Attachments
-
- Screenshot 2021-03-18 at 10.43.20 PM.png (21.21 KiB) Viewed 3413 times
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
markov chain
With TikZ the right part of the drawing could be created as follows:
Code: Select all
\documentclass[tikz, border=5pt]{standalone}
\usetikzlibrary{positioning,quotes,arrows.meta,automata}
\begin{document}
\begin{tikzpicture}[
>={Triangle[scale=.8]},
font=\sffamily,
every edge/.append style={font=\sffamily\footnotesize, ->},
every loop/.style={->}
]
\node [state] (7) {7};
\node [state] (6) [above=of 7] {6};
% The numbers after the dots are angles: <node name>.<angle>
% alternative: <node name>.<anchor>
\path
(7.110) edge ["1"] (6.250)
(6.290) edge ["1/2"] (7.70)
(6) edge [loop right, "1/2"] (6)
;
\end{tikzpicture}
\end{document}-
IbiloyeCA2021
- Posts: 3
- Joined: Sun Mar 21, 2021 9:18 pm
markov chain
Code: Select all
%Here is my attempt, at the Markov chain challenge. :roll: %
\documentclass[tikz, border=8pt]{standalone}
\usetikzlibrary{positioning,quotes,arrows.meta,automata}
\begin{document}
\begin{tikzpicture}[
>={Diamond[scale=.8]},
font=\sffamily,
every edge/.append style={font=\sffamily\footnotesize, ->},
every loop/.style={->}
]
\node [state] (7) {7};
\node [state] (6) [above=of 7] {6};
\node [state] (2) [above= of 6.210] {2};
\node [state] (1) [left= of 2] {1};
\node [state] (3) [below =of 1.150] {Start};
% The numbers after the dots are angles: <node name>.<angle>
% alternative: <node name>.<anchor>
\path
(3) edge ["1.3"] (1)
(1.30) edge ["2/3"] (2.150)
(2.200) edge ["2/3"] (1.340)
(2.300) edge ["1/3"] (6)
(7.110) edge ["2/3"] (6.250)
(6.290) edge ["1/3"] (7.70)
(6)
;
\end{tikzpicture}
\end{document}