I'm trying to create square cells horizontally centred in brackets. The codes are below:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
$$\left (\begin{tikzpicture}
\tikzset{square matrix/.style={
matrix of nodes,
column sep=-\pgflinewidth, row sep=-\pgflinewidth,
nodes={draw,
minimum height=#1,
anchor=center,
text width=#1,
align=center,
inner sep=0pt
},
},
square matrix/.default=1cm
}
\matrix[square matrix]
{
&~&~&~&\\
&~&~&~&\\
};
\end{tikzpicture} \right )$$
\end{document}
I would like to show the result as
How can I do it?
Thank you very much.

