I am very new to Beamer and tikz. I want to draw an irregular graphics for my presentation as attached. I think it should be pretty simple but I just don't know how to draw it. To make simple, please only use tikz (and matrix) and don't use other library. Many thanks!!!
[Tex/LaTex] How to draw a filled irregular graphics only using tikz in beamer
beamertikz-pgf
Related Solutions
One option using TikZ; the only point that perhaps deserves some comment is the curved arrow, produced using an arc
path and a decoration:
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{positioning,decorations.markings,calc}
\begin{document}
\begin{tikzpicture}[
node distance=2cm and 1cm,
mynode/.style={
draw,
text width=6cm,
align=center,
text height=3ex,
text depth=1.5ex,
}
]
\node[mynode] (out) {Output};
\node[mynode,text width=4cm,below=of out] (sh) {State/Hidden};
\node[mynode,below=of sh] (in) {Input};
\draw[-latex] (in) -- node[fill=white] {Weights $V$}(sh);
\draw[-latex] (sh) -- node[fill=white] {Weights $W$}(out);
\begin{scope}[radius=1.2cm]
\draw[
decoration={
markings,
mark=at position 0.999 with {\arrow{latex}}
},
postaction=decorate
]
(sh.16) arc[start angle=160,end angle=-150] (sh.-17);
\node[xshift=1.3cm,anchor=west,text width=2.8cm,align=center]
at (sh.east) {Weights $U$\\(dealyed)};
\end{scope}
\node[anchor=west,text width=4cm] at ([xshift=4cm] $ (in.north)!0.5!(sh.south)$ ) {%
$\displaystyle
\begin{aligned}
&y_j(t)=f(\mathrm{net}_j)\\
&\mathrm{net}_j(t)=\sum_i v_{ji} x_i(t)+\sum_h u_{jh}y_h(t-1)+\theta_j
\end{aligned}$
};
\node[anchor=west,text width=4cm] at ([xshift=4cm] $ (sh.north)!0.5!(out.south)$ ) {%
$\displaystyle
\begin{aligned}
&y_k(t)=g(\mathrm{net}_k)\\
&\mathrm{net}_k(t)=\sum_j w_{kj} y_j(t)+\theta_k
\end{aligned}$
};
\end{tikzpicture}
\end{document}
Reasonably minimal:
\documentclass[tikz,border=5]{standalone}
\usetikzlibrary{matrix}
\begin{document}
\tikz[x=1em, y=1em, inner sep=1em/6]]
\matrix [left delimiter={[}, right delimiter={]}] {
\draw (0,0) \foreach \i [count=\j] in {1,2,1,3,1,2,2,1,1}{
\ifnum\j>1-- ++(0,-1)\fi node [above right] (x-\j) {$x$} -- ++(\i,0)
}
(x-1 -| x-\j) node [left] {possibly nonzero entries}
(x-1 |- x-\j) node [right] {zero entries};
\\};
\end{document}
Best Answer