[Tex/LaTex] How to draw an arrow between tables

arrowstablestikz-arrows

I need a arrow between this table, like this

Tables

Code

\documentclass[11pt,a4paper]{article}

\begin{table}[h]
\centering
\label{my-label}
\begin{tabular}{|c|cccc|c|}
\hline
 & $x_1$ & $x_2$ & $x_3$ & $x_4$ & $h(x)$ \\ \hline
1 & 1 & 0 & 1 & 1 & 13.25 \\
2 &  &  &  &  &  \\
\vdots &  &  &  &  &  \\
N &  &  &  &  &  \\ \hline
\end{tabular}
\end{table}

\begin{table}[h]
\centering
\label{my-label}
\begin{tabular}{|c|cccc|c|}
\hline
 & $x_1$ & $x_2$ & $x_3$ & $x_4$ & $h(x)$ \\ \hline
1 & 1 & 0 & 1 & 1 & 13.25 \\
2 &  &  &  &  &  \\
\vdots &  &  &  &  &  \\
N &  &  &  &  &  \\ \hline
\end{tabular}
\end{table}

\end{document}

Best Answer

tikz to the rescue! Since tables are floating objects they can move anywhere in a document, so combine two tabulars in the same table.

enter image description here

\documentclass[11pt,a4paper]{article}
\usepackage{tikz}
\begin{document}
\begin{table}[h]
\centering
\begin{tikzpicture}
\node (a) at (0,0){
\begin{tabular}{|c|cccc|c|}
\hline
 & $x_1$ & $x_2$ & $x_3$ & $x_4$ & $h(x)$ \\ \hline
1 & 1 & 0 & 1 & 1 & 13.25 \\
2 &  &  &  &  &  \\
\vdots &  &  &  &  &  \\
N &  &  &  &  &  \\ \hline
\end{tabular}};
\node[yshift=-2cm] (b) at (a.south) 
{
\begin{tabular}{|c|cccc|c|}
\hline
 & $x_1$ & $x_2$ & $x_3$ & $x_4$ & $h(x)$ \\ \hline
1 & 1 & 0 & 1 & 1 & 13.25 \\
2 &  &  &  &  &  \\
\vdots &  &  &  &  &  \\
N &  &  &  &  &  \\ \hline
\end{tabular}
};
\draw[->,ultra thick](a)--(b);
\end{tikzpicture}
\label{my-label}
\end{table}

\end{document}