# Drawing filter banks

I want to draw filter banks which look somehow like in the pictures below. Could you give my some hints how should I do this?

-
First hint: Some basic examples are given in the documentation. – Marco Daniel May 18 '12 at 21:18
I've just found the solution. – Pavasaris May 18 '12 at 21:26

Using the package Tikz/PGF you will draw this filter banks with a simple codification. Tikz is very powerfull LaTeX package for drawing. The website TeXample contains a great compilation of examples using this package, sure it will help you. Filter Banks are as Block Diagrams, see the section Block Diagrams at TeXample for help.

For example, this code produces a simple block diagrams:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}

\begin{document}
\begin{tikzpicture}[auto,>=latex']
\tikzstyle{block} = [draw, shape=rectangle, minimum height=3em, minimum width=3em, node distance=2cm, line width=1pt]
\tikzstyle{sum} = [draw, shape=circle, node distance=1.5cm, line width=1pt, minimum width=1.25em]
\tikzstyle{branch}=[fill,shape=circle,minimum size=4pt,inner sep=0pt]
%Creating Blocks and Connection Nodes
\node at (-2.5,0) (input) {$x[n]$};
\node [block] (h1) {$h_1[n]$};
\node [block, right of=h1] (h2) {$h_2[n]$};
\node [sum, right of=h2] (sum) {};
\node at (sum) (plus) {{\footnotesize$+$}};
\node at (5,0) (output) {$y[n]$};
\path (h1) -- coordinate (med) (h2);
\path (input) -- coordinate(branch1) (h1);
\node [block, below of=med] (h3) {$h_3[n]$};
%Conecting Blocks
\begin{scope}[line width=1pt]
\draw[->] (input) -- (h1);
\draw[->] (h1) -- (h2);
\draw[->] (h2) -- (sum);
\draw[->] (sum) -- (output);
\draw[->] (branch1) node[branch] {} |- (h3);
\draw[->] (h3) -| (sum);
\end{scope}
\end{tikzpicture}
\end{document}


In the document preamble add \usepackage{tikz}, I know that the code seems a little difficult but it is.

The operating principle of the package is: drawn nodes over a grid, and every node can contain a figure or simply it work as a connection node. The package manual is a very good documentation about it, see for help.

-
Maybe adding a simple code example would help. – egreg May 18 '12 at 21:29
In a moment! :) – OSjerick May 18 '12 at 21:32
\begin{tikzpicture}[auto,>=latex'] while making pdf, here process stops and says that arrow end type latex is unknown. – Pavasaris May 18 '12 at 22:17
Sorry! I forgot, you must use \usetikzlibrary{shapes,arrows} in the preamble. See corrected code, copy and paste with it. :) – OSjerick May 18 '12 at 22:32
OK, everything works. Thank you :) – Pavasaris May 18 '12 at 22:34