I would like to draw the following picture
I have tried my best but nothing work. My code isn't really worth posting it here. The problem I'm facing is fitting blocks inside one block with proper connection between them. I have tried to use fit
, but it is not working or I think I misuse it. Appreciate any help.
Edit:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc,fit,arrows, positioning}
\usepackage{graphicx}
\begin{document}
\noindent\resizebox{\textwidth}{!}{
\begin{tikzpicture}[auto,node distance=5cm,>=stealth']
\tikzset{
block/.style= {draw, rectangle, minimum height=2em,minimum width=4em},
sum/.style = {draw, circle, node distance=2cm},
input/.style = {coordinate},
output/.style = {coordinate}}
\node [input, name=input](input) {};
\node [sum, right of=input] (sum) {$\sum$};
\node [block, right of=sum, minimum height=6cm, minimum width=8cm] (M) {};
\node [coordinate, below of=M, yshift=1cm] (link1) {};
\node [coordinate, above of=M, yshift=-1cm] (link2) {};
\draw [-] (link1) -- node {} (M) ;
\draw [->] (link2) -- node {} (M) ;
\draw [<-] (sum) |- node[yshift=3cm, xshift=-.5cm] {$text$} (link1) ;
\node [block, right of=M, rotate=90, minimum width=6cm] (n) {$\textbf{text}$};
\node [block, right of=n, minimum height=6cm, minimum width=5cm] (s) {text};
\node [coordinate, above of=s, yshift=-1cm] (link3) {};
\draw [-] (link3) -- node {} (s) ;
\draw [->] (input) -- node {$text$} (sum);
\draw [->] (sum) -- node {} (M);
\draw [->] (M) -- node {$text$} (n);
\draw [->] (n) -- node {$text$} (s);
\draw [-] (link3) -- node[yshift=.6cm,xshift=-5cm] {text} (link2);
\end{tikzpicture}
}
\end{document}
Best Answer
Would this be what you seek? styledefinitions
block
is for horizontal blocks,blockB
is for vertical blocks (being rotated 90). all text phrases are allocated via node with options likeabove, below, above left, above right
, etc., you may want to adjust to fit your needs.Update: Small modifications to fit the OP's need. Some explanations are added. See %<---
Code:
Code