Latex diagram的问题

推荐网站: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}

画出的图:
这里写图片描述

注:可以自己设置图形
先画点,再连接,可画箭头也可不画箭头。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值