I'm trying to have a multicolumn label but that doesn't seem to work. When I run the following, it fails:
\begin{equation*}
\mathbf{C} =
\begin{blockarray}{ccccccc}
& \multicolumn{5}{c}{\text{Predicted}} & \\
& 1 & 2 & 3 & \dots & n & \\
\begin{block}{c(ccccc)c}
1 & c_{11} & c_{12} & c_{13} & \dots & c_{1n} & \multirow{4}{*}{\rotatebox{-90}{\text{Actual}}} \\
2 & c_{21} & c_{22} & c_{23} & \dots & c_{2n} & \\
\vdots & \vdots & \ddots & & & \vdots & \\
n & c_{n1} & c_{n2} & c_{n3} & \dots & c_{nn} & \\
\end{block}
\end{blockarray}
\end{equation*}
This is the closest I've gotten to a non-failing version but am unable to get the multicolumn label to work.
\begin{equation*}
\mathbf{C} =
\begin{blockarray}{ccccccc}
& \text{Predicted} & & & & \\
& 1 & 2 & 3 & \dots & n & \\
\begin{block}{c(ccccc)c}
1 & c_{11} & c_{12} & c_{13} & \dots & c_{1n} & \multirow{4}{*}{\rotatebox{-90}{\text{Actual}}} \\
2 & c_{21} & c_{22} & c_{23} & \dots & c_{2n} & \\
\vdots & \vdots & \ddots & & & \vdots & \\
n & c_{n1} & c_{n2} & c_{n3} & \dots & c_{nn} & \\
\end{block}
\end{blockarray}
\end{equation*}
How can I get the "Predicted" label to span the remaining columns?
I'm happy to switch to another environment from blockarray but it seemed like this was the recommended package after looking at multiple alternatives for labeled matrixes.
Full document:
\documentclass{beamer}
% PACKAGES
\usepackage{blkarray}
\usepackage{multirow}
\begin{document}
\begin{frame}
\begin{equation*}
\mathbf{C} =
\begin{blockarray}{ccccccc}
& \text{Predicted} & & & & & \\
& 1 & 2 & 3 & \dots & n & \\
\begin{block}{c(ccccc)c}
1 & c_{11} & c_{12} & c_{13} & \dots & c_{1n} & \multirow{4}{*}{\rotatebox{-90}{\text{Actual}}} \\
2 & c_{21} & c_{22} & c_{23} & \dots & c_{2n} & \\
\vdots & \vdots & \ddots & & & \vdots & \\
n & c_{n1} & c_{n2} & c_{n3} & \dots & c_{nn} & \\
\end{block}
\end{blockarray}
\end{equation*}
\end{frame}
\end{document}



multirowworks withblockarrayat all, I'm certain that combination has never been tested by the authors of either package:-) – David Carlisle Aug 25 '18 at 15:04I thought they'd work based on this question: https://tex.stackexchange.com/questions/10122/bordermatrix-with-blocks
– sbeleidy Aug 25 '18 at 15:08\multicolumn{5}{c}{\text{Predicted}}with\BAmulticolumn{5}{c}{\text{Predicted}}and it will works. – Zarko Aug 25 '18 at 15:26\BAmulticolumn(stupid command name, who wrote that package.....) – David Carlisle Aug 25 '18 at 19:21