How can I create the following diagram?
Additionally, I want under the "Channel" box a flash to show channel interference/noise to clarify that Y is corrupted by noise.
How can I create the following diagram?
Additionally, I want under the "Channel" box a flash to show channel interference/noise to clarify that Y is corrupted by noise.
With tikz:
Edit: ok., with added red lightning: One more edit: now is added text to lightning. Since this text is unknow, correct one is left to you ...
\documentclass[tikz, border=3mm]{standalone}
\usepackage{marvosym}
\usetikzlibrary{arrows.meta,
chains, % new
positioning,
quotes,
}
\begin{document}
\begin{tikzpicture}[
node distance = 7mm and 18mm, % <---
start chain = going right,
box/.style = {draw, thick,
minimum height=9mm, minimum width =18mm,
on chain},
every edge/.style = {draw, -Straight Barb, semithick},
every edge quotes/.append style = {font=\footnotesize, align=center},
]
\coordinate[on chain] (in);
\node (n1) [box] {Encoder};
\node (n2) [box,
label={[font=\Huge, text=red]:\Lightning}] {Channel};
\node[above=of n2, font=\footnotesize] {To je strela!}; % <---
\node (n3) [box] {Decoder};
\coordinate[on chain] (out);
%
\path (in) edge ["Message\ $\mathcal{K}$"] (n1)
(n1) edge ["Codeword\ $X_{\mathcal{K}}$"] (n2)
(n2) edge ["Output\ $Y$"] (n3)
(n3) edge ["Estimate\ $\widehat{\mathcal{K}}$"] (out);
\end{tikzpicture}
\end{document}
I propose this solution with basic tools (packages amsmath, eqparbox & stackengine):
\documentclass{article}
\usepackage{eqparbox}
\usepackage[usestackEOL]{stackengine}
\usepackage{amsmath}
\usepackage{geometry}
\begin{document}
[ \xrightarrow{\eqparbox{L}{\bfseries\boldmath\Centerstack{Message \ $\mathcal{K}$}}} \eqframebox[C]{\enspace Encoder\enspace }
\xrightarrow{\eqparbox{L}{\bfseries\boldmath \Centerstack{Codeword \$\textsf{X}_\mathcal{K}$}}}\eqframebox[C]{Channel}
\xrightarrow{\eqparbox{L}{\bfseries\boldmath \Centerstack{Output \ Y}}}\eqframebox[C]{Decoder}
\xrightarrow{\eqparbox{L}{\bfseries\boldmath \Centerstack{Estimate \$\hat{\mathcal{K}}$}}}]%
\end{document}