编码器图

编码器图

我正在尝试创建一个编码器框图。 在此处输入图片描述

有人能给我提供起点吗?问候

答案1

TikZ解决方案:

在此处输入图片描述

\documentclass[tikz, border=3mm]{standalone}
\usetikzlibrary{arrows.meta, calc, chains, positioning}
\newcommand\ppbb{path picture bounding box}

\makeatletter
\tikzset{suppress join/.code={\def\tikz@after@path{}}}
\makeatother

\begin{document}
    \begin{tikzpicture}[
            > = Triangle,
node distance = 7mm,
  start chain = going right,
box/.style = {draw, minimum size=7mm, on chain, join=by ->},
dot/.style = {circle, draw, fill, minimum size=1mm, inner sep=0mm,
              on chain, join=by -, node contents={}},
sum/.style = {circle, draw, minimum size=6mm,
              path picture={\draw[thick,shorten <=1.5mm,shorten >=1.5mm,-]
                                (\ppbb.north) edge (\ppbb.south)
                                (\ppbb.west)  edge (\ppbb.east);
                            },% end of path picture /node content/
              node contents={}},
                        ]
\coordinate[on chain, label=left:{$X[n]$}] (in);
\node (n1) [dot];
\node (n2) [box] {$z^{-1}$};
\node (n3) [dot];
\node (n4) [box] {$z^{-1}$};
\node (n5) [dot];
\node (n6) [box,suppress join] {$\&$};
\coordinate[on chain, join=by ->,label=right:{$Y[n]$}] (out);
%
\node (s1) [sum,above=of n2.north -| n3];
\node (s2) [sum,above=of n2.north -| n5];
%
\node (s3) [sum,below=of n2.south -| n3];
\node (s4) [sum,below=of n2.south -| n5];
%
\draw[->]   (n1)  |-  (s1);
\draw[->]   (s1) edge (s2)
            (s2)  -|  node[right] {$Y_1[n]$} (n6)
            (n3) edge (s1)
            (n5) edge (s2);
%
\draw[->]   (n1)  |-  (s3);
\draw[->]   (s3) edge (s4)
            (s4) -| node[right] {$Y_2[n]$} (n6)
            (n3) edge (s3)
            (n5) edge (s4);
    \end{tikzpicture}%
\end{document}

答案2

下面是一个带有 的简短代码。只要您在启动编译器时使用、和开关,就pstricks可以用 进行编译。pdflatex--enable-write18MiKTeX-shell-escapeTeX LiveMacTeX

\documentclass[border=3pt]{standalone}
\usepackage{amsmath}

\usepackage{pst-node, auto-pst-pdf}

\begin{document}

   $ \def\pscolhookii{\hskip-.4cm}
    \psset{emnode=p}
      \begin{psmatrix}[rowsep=1cm, colsep=1.2cm, emnode=p]%[, rowsep=0.8cm]
    %% nodes
    & & & \circlenode{+A}{+} & & \circlenode{+C}{+} & \\
      X[n] & & \fbox{$Z⁻¹$\strut} & & \fbox{$Z⁻¹$\strut} & & \fbox{\&\rule[-2.5ex]{0pt}{6ex}} & [name=Y]Y_{\text{out}} \\
      & & & & & \circlenode{+B}{+} &
        %%lines and arrows
      \psset{arrowinset=0.15, nodesep=0pt, linewidth=0.6pt}
     \ncline[arrows=->]{2,1}{2,3} \ncline{2,3}{2,5}
     \ncline[arrows=->]{2,7}{Y}
      \ncangle[angleB=90]{2,5}{+B}\ncangle[angleB=-90]{2,5}{+C}%
     \ncline{+A}{+C}
     \ncangle[angleA=-90, angleB=180]{+A}{+B}
     \ncbar[arrows=<->, armA=7cm, angleA=180, angleB=180]{+B}{+A}
      \ncline{2,7}{1,7} \ncline{2,7}{3,7}
     \psset{arrows=->, nodesepB =-0.4pt}
     \ncline{+C} {1,7}\ncline{+B}{3,7}
     \nput{0}{1,7}{Y_\textrm{out.1}}
    \nput{0}{3,7}{Y_\textrm{out.2}}
    \end{psmatrix}%
    $

    \end{document} 

在此处输入图片描述

相关内容