多输入输出块系统

多输入输出块系统

我正在尝试制作多个输入和输出块,但我发现的旧问题对我没有太大帮助。这是我正在尝试制作的系统:

在此处输入图片描述

以下是代码:

\documentclass{article}
\usepackage[utf8]{inputenc} 
\usepackage{float} 
\usepackage{geometry}   
\usepackage{tikz}   
\usetikzlibrary{shapes,arrows} 

\begin{document}

\maketitle

\tikzstyle{block} = [draw, fill=white, rectangle, 
    minimum height=3em, minimum width=6em]
\tikzstyle{block2} = [draw, fill=white, rectangle, 
    minimum height=6em, minimum width=3em]
\tikzstyle{input} = [coordinate]
\tikzstyle{output} = [coordinate]
\tikzstyle{pinstyle} = [pin edge={to-,thin,black}] 

\begin{figure}[H]\centering
\begin{tikzpicture}[auto, node distance=2cm,>=latex']
%Declara los nodos
\node [block, name=input] {Binary Signal}; 
\node [block2, right of=input, node distance = 3cm] (S/P) {Series to Parallel}; 
\node [block2, right of=S/P, node distance = 3cm] (Modulation) {Modulation};
\node [block2, right of=Modulation, node distance = 3cm] (IFFT) {IFFT}; 
\node[block, above = 2cm, right = 7.9cm](CP){Cyclic Prefix}; 
\node[block2, right of = IFFT,node distance = 3cm](P/S){Parallel to Series}; 
\node [block2, right of=P/S, node distance = 3cm] (Channel) {Channel};



%Ahora conectamos los bloques 
\draw [->] (input) -- node {} (S/P);   
\draw [->] (S/P) -- node[name= ] {$ $} (Modulation);  
\draw[->] (Modulation) -- node{}(IFFT);
\draw [->] (IFFT) -- node [name=y] {}(P/S); 
\draw[->] (CP) -| node{} (P/S) ; 
\draw[->] (P/S) -- node{} (Channel);

\end{tikzpicture} 
\end{figure} 

\end{document}

答案1

您的代码中有部分内容已被弃用:\tikzstyle以及您定位节点的方式。以下是使用更现代语法的提议。

\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{arrows.meta,chains} 
\begin{document}
\tikzset{block/.style={draw, fill=white, rectangle, 
    minimum height=3em, minimum width=6em},
block2/.style={draw, fill=white, rectangle, 
    minimum height=6em, minimum width=3em},
input/.style={coordinate},
output/.style={coordinate},
pinstyle/.style={pin edge={to-,thin,black}}} 

\begin{tikzpicture}[auto, node distance=6mm,>=Latex,
    arj/.style={->},
    vertical shift/.style={to path={([yshift=#1]\tikztostart.east)
     -- ([yshift=#1]\tikztotarget.west)}},vertical shift/.default=0pt]
    \path[start chain=R going right,nodes={on chain,join=by arj}]
     node [block, name=input] {Binary Signal}
     node [block2] (S/P) {Series to Parallel}
     node [block2] (Modulation) {Modulation}
     node [block2] (IFFT) {IFFT}
     node [block2] (P/S){Parallel to Series}
     node [block2] (Channel) {Channel};
    \node[block, above = of IFFT](CP){Cyclic Prefix}; 

    \draw foreach \X in {2,3,4} {foreach \Y in {20,10,-10,-20}
    {(R-\X) edge[vertical shift=\Y pt,->]  (R-\the\numexpr\X+1)}};
    \foreach \Y in {-1,0,1)}
    {\draw[->] ([yshift=\Y*8pt]CP.east) -| ([xshift=\Y*10pt]P/S.north);}
\end{tikzpicture} 
\end{document}

在此处输入图片描述

相关内容