I'm trying to replicate Figure 3.15 as shown here so that I can display 3 matrices side by side with captions:
Anyone know of a simple way to get the formatting right? This is what I'm currently using just so that I have something:
\begin{figure}
\centering
\begin{subfigure}{.5\textwidth}
\centering
\subcaption{Image matrix, $f(x,y)$}
{$\begin{matrix}
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 1 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 \\
\end{matrix}$}
\label{fig:sub1}
\end{subfigure} \vspace{5mm}
\begin{subfigure}{.5\textwidth}
\centering
\subcaption{Spatial Mask, $w(x,y)$}
$\begin{matrix}
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9 \\
\end{matrix}$
\label{fig:sub1}
\end{subfigure} \vspace{5mm}
\begin{subfigure}{.5\textwidth}
\centering
\subcaption{Convolved image}
$\begin{matrix}
0 & 0 & 0 & 0 & 0 \\
0 & 1 & 2 & 3 & 0 \\
0 & 4 & 5 & 6 & 0 \\
0 & 7 & 8 & 9 & 0 \\
0 & 0 & 0 & 0 & 0 \\
\end{matrix}$
\label{fig:sub1}
\end{subfigure}
\end{figure}