4

I would like get some help with this. This is the 2nd time I use Tikz and I'm trying to draw the following in latex. enter image description here. I started with the script in Drawing a multiple input - multiple output system diagram with TiKz I tried to look up how to modify it to look like the one I want but no success. I would appreciate your help with this.

\documentclass[border=3mm,
               tikz]{standalone}
\usetikzlibrary{arrows,positioning}
    \begin{document}
\begin{tikzpicture}[
node distance = 4mm and 22mm]
\node (adc) [draw,minimum size=24mm] {ADC};
\coordinate[above left = of adc.west]   (a1);
\coordinate[below = of a1]              (a2);
\coordinate[below = of a2]              (a3);
\coordinate[above right= 8mm and 22mm of adc.east]  (b1);
\coordinate[above right = of adc.east]   (A1);
\coordinate[below = of A1]              (A2);
\coordinate[below = of A2]              (A3);
\coordinate[above left= 8mm and 22mm of adc.west]  (b2);
\foreach \i [count=\xi from 1] in {X,Y,Z}
\draw[-latex']  (a\xi) node[left] {\i} -- (a\xi-| adc.west);
\foreach \i [count=\xi from 1] in {A,B,C}
\draw[-latex']  (A\xi-| adc.east) -- (A\xi) node[right] {\i};
\end{tikzpicture}
    \end{document}

****** UPDATE Can someone help me with aligning the input and the output arrows in the code below (from the answer below by @marmot). Thank you

\documentclass[border=3.14mm,tikz]{standalone}
\usetikzlibrary{arrows.meta,positioning}

    \begin{document}
        \tikzset{% https://tex.stackexchange.com/a/156990/121799
            dots/.style args={#1per #2}{%
                line cap=round,
                dash pattern=on 0 off #2/#1
            }
        }

    \begin{tikzpicture}[>=Latex]
    \node (adc) [draw,minimum size=24mm]at (0,0) {ADC} ;
    \coordinate[right=3.5cm of adc] (r);
    \coordinate[below=1cm of adc] (b);
    \foreach \X/\Z [count=\Y] in {0.1/1,0.7/2,1.8/n}
    {
        \node[below left=\X*1cm and 2cm of adc.north west] (y\Y) {$x_\Z$};
        \draw[->] (y\Y) -- (y\Y-|adc.west) coordinate[pos=\Y/4] (aux\Y);
        \node[draw,below right=\X*1cm and {(2.5-\X)*1cm} of adc.north east,circle,inner sep=3pt] (y'\Y) {};
        %   \node[below left=\Y*1cm and 2cm of adc.north west] (y'\Y) {$\hat{x}_\Z$};
        %   \draw[->] (y'\Y-|adc.east) -- (y'\Y);
        \draw[->] (y'\Y-|adc.east)node[above right]{$\hat{x}_\Z$} --   (y'\Y);
        \draw[->] (y'\Y) -- (y'\Y-|r) node[right]{$r_\Z$};
        \draw[->] (aux\Y) |- ([yshift={(-1+\Y*0.5)*1cm}]b) -| (y'\Y);
    }
    \draw[very thick,dots={6 per 1cm}] ([yshift=1mm]aux3) -- ([yshift=-1mm]aux2 -| aux3);
    \draw[very thick,dots={6 per 1cm}] ([yshift=1mm]y'3.north) -- ([yshift=-1mm]y'2 -| y'3);
    \end{tikzpicture}

    \end{document}

enter image description here

4

The arrows library has been superseded by arrows.meta.

\documentclass[border=3.14mm,tikz]{standalone}
\usetikzlibrary{arrows.meta,positioning}
\begin{document}
\tikzset{% https://tex.stackexchange.com/a/156990/121799
  dots/.style args={#1per #2}{%
    line cap=round,
    dash pattern=on 0 off #2/#1
  }
}

\begin{tikzpicture}[>=Latex]
\node (adc) [draw,minimum size=24mm]at (0,0) {ADC} ;
\coordinate[right=4cm of adc] (r);
\coordinate[below=1cm of adc] (b);
\foreach \X/\Z [count=\Y] in {0.1/1,0.5/2,1.8/n}
{\node[below left=\X*1cm and 2cm of adc.north west] (y\Y) {$y_\Z$};
\draw[->] (y\Y) -- (y\Y-|adc.west) coordinate[pos=\Y/4] (aux\Y);
\node[draw,below right=\X*1cm and {(2.5-\X)*1cm} of adc.north east,circle,inner sep=3pt] (y'\Y) {};
\draw[->] (y'\Y-|adc.east) --  node[pos=0.5,above]{$\widehat{y}_\Y$} (y'\Y);
\draw[->] (y'\Y) -- (y'\Y-|r) node[right]{$r_\Z'$};
\draw[->] (aux\Y) |- ([yshift={(-1+\Y*0.5)*1cm}]b) -| (y'\Y);
}
\draw[very thick,dots={6 per 1cm}] ([yshift=1mm]aux3) -- ([yshift=-1mm]aux2 -| aux3);
\draw[very thick,dots={6 per 1cm}] ([yshift=1mm]y'3.north) -- ([yshift=-1mm]y'2 -| y'3);
\end{tikzpicture}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.