0

I was wondering if anyone would know how to make something similar to what is attached in the image. enter image description here

I have the following code but what I am looking for is to be able to transform it into something similar to what I showed in the previous figure.

\documentclass[8pt]{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}\setlength\arraycolsep{0pt}\small% added
\text{Roberts}
    =\begin{cases}
           G_x = \begin{pmatrix}
                    1 & 0\\
                    0 & -1
                \end{pmatrix} \\[3ex]
           G_y = \begin{pmatrix}
                    0 & 1\\
                    -1 & 0
                \end{pmatrix}
        \end{cases}
\text{Prewitt}
    =\begin{cases}
           G_x = \begin{pmatrix}
                    1 & 0 & -1\\
                    1 & 0 & -1\\
                    1 & 0 & -1
                \end{pmatrix}\\[4ex]
           G_y = \begin{pmatrix}
                    1 & 1 & 1\\
                    0 & 0 & 0\\
                    -1 & -1 & -1
                \end{pmatrix}
        \end{cases}
\ 
\text{Sobel}
    =\begin{cases}
           G_x = \begin{pmatrix}
                    -1 & 0 & -1\\
                    -2 & 0 & 2\\
                    -1 & 0 & 1
                \end{pmatrix}\\[4ex]
           G_y = \begin{pmatrix}
                    1 & 2 & 1\\
                    0 & 0 & 0\\
                    -1 & -2 & -1
                \end{pmatrix}
        \end{cases}
\label{eq:2}
\end{equation}


\end{document}
1
  • Should it be a figure (so something floating) containing math or really an equation? Do the separate equations need to be referenced with a, b, c? Please provide some more background. – campa Nov 12 '20 at 17:04
1

With use of subfigures:

enter image description here

\documentclass{article}
\usepackage{geometry}
\usepackage{amsmath}
\usepackage{caption,subcaption}
\captionsetup{skip=1ex,
              font={small,sf},
              labelfont=bf,
              singlelinecheck=false}

\begin{document}
    \begin{figure}[ht]
    \setlength\arraycolsep{1pt}
    \small
\begin{subfigure}[b]{0.3\linewidth}
\[
\text{Roberts}
    =\begin{cases}
           G_x = \begin{pmatrix}
                    1 & 0\\
                    0 & -1
                \end{pmatrix} \\[9ex]
           G_y = \begin{pmatrix}
                    0 & 1\\
                    -1 & 0
                \end{pmatrix}
        \end{cases}
\]
\caption{}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\linewidth}
\[
\text{Prewitt}
    =\begin{cases}
           G_x = \begin{pmatrix}
                    1 & 0 & -1\\
                    1 & 0 & -1\\
                    1 & 0 & -1
                \end{pmatrix}\\[2ex]
           G_y = \begin{pmatrix}
                    1 & 1 & 1\\
                    0 & 0 & 0\\
                    -1 & -1 & -1
                \end{pmatrix}
        \end{cases}
\]
\caption{}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\linewidth}
\[
\text{Sobel}
    =\begin{cases}
           G_x = \begin{pmatrix}
                    -1 & 0 & -1\\
                    -2 & 0 & 2\\
                    -1 & 0 & 1
                \end{pmatrix}\\[2ex]
           G_y = \begin{pmatrix}
                    1 & 2 & 1\\
                    0 & 0 & 0\\
                    -1 & -2 & -1
                \end{pmatrix}
        \end{cases}
\]
\caption{}
\end{subfigure}
\caption{Example}
\label{eq:2}
    \end{figure}
\end{document}
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.