0

I want to put a matrix besides a figure and put an arrow between them that looks as follows:

enter image description here

My current working is as follows:

\documentclass{article}

\usepackage{graphicx,amsmath}

\begin{document}

\begin{figure}[!h]
    \centering
    \includegraphics[width=0.8\textwidth]{eeg}
    \caption{The recorded EEG signals.}
    \label{fig:eeg-signals}
\end{figure}

\begin{equation*}
    \left(\begin{array}{cccc}
        a_{11} & a_{12} & \cdots & a_{1n}   \\
        a_{21} & a_{22} & \cdots & a_{2n}   \\
        \vdots & \vdots & \ddots & \vdots   \\
        a_{n1} & a_{n2} & \cdots & a_{nn}
    \end{array}\right)
\end{equation*}

\end{document} 

that produces:

enter image description here

How can I do this? Please help.

1
  • Put your math inside the figure. You might even want to use tikz to place the image on the left, the matrix in the right and draw an arrow between them
    – daleif
    Apr 5 '21 at 13:22
1

If you just want to show this, you can insert everything in TikZ nodes.

\documentclass{standalone}

\usepackage{tikz,graphicx,amsmath}
\usetikzlibrary{positioning}

\begin{document}

    \begin{tikzpicture}
        \node (IMG) {
                \includegraphics[width=0.8\textwidth]{example-image}
            };
        \node[below = 2mm of IMG] (LBL) {Figure 1 : eeg-signals};
        \node[right = 2cm of IMG] (MTRX) {
            $
                \left(\begin{array}{cccc}
                    a_{11} & a_{12} & \cdots & a_{1n}   \\
                    a_{21} & a_{22} & \cdots & a_{2n}   \\
                    \vdots & \vdots & \ddots & \vdots   \\
                    a_{n1} & a_{n2} & \cdots & a_{nn}
                \end{array}\right)
            $
            };
        \draw[line width=2pt,->] (IMG) -- (MTRX);
    \end{tikzpicture}

\end{document}

with tikz

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.