How to draw the following picture in LaTeX,
I tried to use the following code but it doesn't work.
\begin{figure}[H]
\centering
\begin{tikzpicture}
\matrix[matrix of nodes,row sep=2em] (m)
{
$N$: & 1 & 2 & 3 & 4 &\ldots &n-1 &n \\
$N'$:& 2 & 3 & 4 & 5 &\ldots &n & n+1 \\
};
\foreach \y in {1,2,3,4,n-1,n} {
\foreach \x in {2,3,4,5,n,n+1} {
\draw[<->] (m-\y-\x) -- (m-2-\x);
}
}
\end{tikzpicture}
\captionsetup{labelformat=empty}
\caption{\label{fig:f4}Figure 1.4}
\end{figure}




\labelshould go after the\captioncommand, and not inside it? – Bakuriu Apr 12 '16 at 11:06