I have a matrix with labels on the left and top. Now I want to have a label on all sides of the matrix. How can I change my code?
\documentclass[10 pt, a4paper, leqno, oneside] {report}
\usepackage{kbordermatrix}
\begin{document}
\renewcommand{\kbldelim}{(}% Left delimiter
\renewcommand{\kbrdelim}{)}% Right delimiter
\[
\tilde{\textbf{m}} = \kbordermatrix{
\mbox{} & c_1 & c_2 & c_3 & c_4 & c_5 \\
% & c_1 & c_2 & c_3 & c_4 & c_5 \\
r_1 & 1 & 1 & 1 & 1 & 1 \\
r_2 & 0 & 1 & 0 & 0 & 1 \\
r_3 & 0 & 0 & 1 & 0 & 1 \\
r_4 & 0 & 0 & 0 & 1 & 1 \\
r_5 & 0 & 0 & 0 & 0 & 1
}
\]
\end{document}
Best Answer
You can use
blkarray
to construct the components of a multi-indexed array: