推荐网站:http://www.texample.net/tikz/examples
画程序框图
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\begin{document}
\tikzstyle{block} = [draw, rectangle,
minimum height=3em, minimum width=6em]
\tikzstyle{sum} = [draw, circle, node distance=1cm]
\tikzstyle{input} = [coordinate]
\tikzstyle{output} = [coordinate]
\tikzstyle{pinstyle} = [pin edge={to-,thin,black}]
\begin{tikzpicture}[auto, node distance=2cm,>=latex']
% We start by placing the blocks
\node [input, name=input] {};
\node [sum, right of=input] (sum) {};
\node [block, right of=sum] (controller) {$Q$};
\node [block, right of=controller,node distance=3cm] (nonlinear){$\psi(\cdot)$};
\node [block, right of=nonlinear,node distance=3cm] (system) {$q^{-d}T$};
\node [sum, right of=system,node distance=2cm] (sum2) {};
\node [block, above of=sum2,node distance=1.5cm] (filter) {$N$};
\node [input, above of=filter,node distance=1.5cm](noise){};
\draw [->] (controller) -- node[name=u] {$u_t$} (nonlinear);
\node [output, right of=system] (output) {};
%\node [block, below of=u] (measurements) {$1$};
\node [output, right of=sum2] (output1) {};
\draw [->] (noise) -- node {$a_t$} (filter);
\draw [->] (input) -- node {$y_r$} (sum);
\draw [->] (sum) -- node {$e_t$} (controller);
\draw [->] (nonlinear) -- (system);
\draw [->] (system) -- node {}(sum2);
\draw [->] (sum2) -- node [name=y1] {$y_t$}(output1);
\node [output, below of=u] (measurements){};
\draw [-] (y1) |- (measurements);
\draw [->] (measurements) -| node[pos=0.99] {$-$}
node [near end] {} (sum);
\draw [->] (filter) -- node[pos=0.99] {$+$}
node [near end] {} (sum2);
\end{tikzpicture}
\end{document}
画出的框图:
流程图
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\begin{document}
\tikzstyle{block} = [draw, rectangle,
minimum height=3em, minimum width=6em,text centered]
\tikzstyle{sum} = [draw, circle, node distance=1cm]
\tikzstyle{judge} = [draw, diamond,aspect=2,text width=6em,text centered]
\tikzstyle{input} = [coordinate]
\tikzstyle{output} = [coordinate]
\tikzstyle{pinstyle} = [pin edge={to-,thin,black}]
\begin{tikzpicture}[auto, node distance=2cm,>=latex']
\node [block, name=running]{Running Data};
\node [block, below of=running](bispectrum){Bispectrum Estimation};
\node [judge,below of=bispectrum](judge){ $bic^2$ is a constant?};
\node [output, left of=judge,node distance=3cm] (left){};
\node [output, right of=judge,node distance=3cm] (right){};
\node [block, below of=left] (linear){Linear Model};
\node [block, below of=linear,node distance=2cm] (model){AR/MA/ARMAX$\cdots$ Model};
\node [block, below of=right] (nonlinear){Nonlinear Model};
\node [block, below of=nonlinear] (volterra){Volterra Model};
\node [output, below of=judge,node distance=5.5cm] (join){};
\node [block, below of=join,node distance=1.5cm] (calculate){Calculate Residuals};
\node [block, below of=calculate] (verification){Verification};
\draw [->] (running) -- (bispectrum);
\draw [->] (bispectrum) -- (judge);
\draw [-] (left) -- node {$Yes$} (judge);
\draw [-] (judge) -- node {$No$} (right);
\draw [->] (left) -- (linear);
\draw [->] (linear) -- (model);
\draw [-] (model) |- (join);
\draw [->] (right) --(nonlinear);
\draw [->] (nonlinear) --(volterra);
\draw [-] (volterra) |- (join);
\draw [->] (join) -- (calculate);
\draw [->] (calculate) --(verification);
\end{tikzpicture}
\end{document}
画出的图:
注:可以自己设置图形
先画点,再连接,可画箭头也可不画箭头。