If I have this matrix code,
\begin{tikzpicture}
\matrix[matrix of math nodes, anchor=south west,
nodes={
draw=red,
align=center,
inner sep=0pt,
text width=1cm - \pgflinewidth,
minimum size = 1cm - \pgflinewidth
}
]{
A & B & D & B & A & C & E & G & E & H & E & C & F & I & F & C & A \\
0 & 1 & 2 & 1 & 0 & 1 & 2 & 3 & 2 & 3 & 2 & 1 & 2 & 3 & 2 & 1 & 0 \\
};
\end{tikzpicture}
there is a way to extrac the matrix dimension in some variable "m" (for the rows) and "n" (for the columns) without counting them manually?
