作业要画markov转移图,找了半天TIKZ怎么画FSM,代码记录一下
\documentclass[a4paper,UTF8]{article}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,chains}
\begin{document}
%这里放下面的代码
\end{document}
\begin{figure}
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=2cm,
thick,base node/.style={circle,draw,minimum size=16pt}, real node/.style={double,circle,draw,minimum size=35pt}]
\node[shape=circle,draw=black](0){0};
\node[shape=circle,draw=black](1)[right of=0 ]{1};
\node[shape=circle,draw=black](2)[right of=1 ]{2};
\node[shape=circle,draw=black](3)[right of=2 ]{3};
\path[]
(0) edge [loop above]node {0.75} (0)
(1) edge [loop above]node {0.75} (1)
(2) edge [loop above]node {0.75} (2)
(0) edge node {0.25} (1)
(1) edge node {0.25} (2)
(2) edge node {0.25} (3);%注意path只有一个分号
\end{tikzpicture}
\end{fi