为具有一列的矩阵定义东/西锚点

为具有一列的矩阵定义东/西锚点

我有以下代码:

\documentclass{article}
\usepackage{amsmath}
\usepackage[margin=0.5in]{geometry}
\usepackage{rotating}
\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{matrix}
\usetikzlibrary{decorations.pathreplacing}

\begin{document}
    \begin{sideways}
        \begin{tikzpicture}[
            %%---------------------------------------
            %%---------------------------------------
          ]
          \matrix (ae) [matrix of nodes,
                        column 1/.style={anchor=west},
                        column 6/.style={anchor=east},
                        minimum width=1cm,
                        column sep=0.3ex,
                        row sep=0.3ex,
                        nodes in empty cells,
                        ]
          {
           $x(0)$ &  $0$   & $0$ & $---$ & $---$  & $0$ \\
           $x(1)$ & $x(0)$ & $0$ & $---$ & $---$  & $0$ \\
           $x(2)$ & $x(1)$ & $x(0)$ &       &       & $|$ \\
            $|$   &  $|$   &       &       &       & $|$\\
           $|$  &  $|$  &       &       &       & $|$\\
           $|$  &  $|$  &       &       &       & $|$\\
           $|$  &  $|$  &       &       &       & $|$\\
           $x(p-1)$ & $x(p-2)$ & $x(p-3)$ & $---$ & $x(0)$& $0$\\
           $x(p)$   & $x(p-1)$ & $x(p-2)$ & $---$ & $---$ & $x(0)$\\
           $x(p+1)$ & $x(p)$   & $x(p-1)$ & $---$ & $---$ & $x(1)$\\
           $|$ & $|$ & $|$ & & & $|$\\
           $|$ & $|$ & $|$ & & & $|$\\
           $|$ & $|$ & $|$ & & & $|$\\
           $|$ & $|$ & $|$ & & & $|$\\
           $x(N-1)$ & $x(N-2)$ & $x(N-3)$ & $---$ & $---$ & $x(N-1-p)$\\
           $0$ & $x(N-1)$ & $x(N-2)$ & $---$ & $---$ & $x(N-p)$\\
           $0$ & $0$ & $x(N-1)$ & $---$ & $---$ & $x(N-p+1)$\\
           $|$ & $|$ &   $|$    &       &       &   $|$\\
           $|$ & $|$ &   $|$    &       &       &   $|$\\
           $|$ & $|$ &   $|$    &       &       &   $|$\\
           $|$ & $|$ &   $|$    &       &       &   $|$\\
           $0$ & $0$ &   $0$    & $---$ & $---$ & $x(N-1)$\\
          };

          % Vertical lines at the left corner
          \draw[line width=0.6pt] ($(ae-1-1.west)-(10ex,0)$) node[] {\textbullet} -- node[left] {$p$}
              ($(ae-7-1.south west)-(10ex,0)$) node[] {\textbullet};
          \draw[line width=0.6pt] ($(ae-10-1.west)-(10ex,0)$) node[] {\textbullet} -- ($(ae-12-1.south west)-(10ex,0)$)
               node[left,xshift=-1mm] {$N - p$} node[yshift=-1mm] {$\approx$};
          \draw[line width=0.6pt] ($(ae-13-1.north west)-(10ex,0)$) -- ($(ae-15-1.west)-(10ex,0)$)
               node[] {\textbullet};
          \draw[line width=0.6pt] ($(ae-16-1.west)-(10ex,0)$) node[] {\textbullet} -- node[left] {$p$}
              ($(ae-22-1.west)-(10ex,0)$) node[] {\textbullet};

          % Left side matrix delimiter
          \draw[line width=0.6pt] ($(ae-1-1.north west)-(6ex,0)$) -- ++(5mm, 0);
          \draw[line width=0.6pt] ($(ae-1-1.north west)-(6ex,0)$) -- ($(ae-12-1.south west)-(6ex,0)$) node[yshift=-1mm]{$\approx$};
          \draw[line width=0.6pt] ($(ae-13-1.north west)-(6ex,0)$) -- ($(ae-22-1.south west)-(6ex,0)$);
          \draw[line width=0.6pt] ($(ae-22-1.south west)-(6ex,0)$) -- ++(5mm, 0);

          % Right side matrix delimiter
          \draw[line width=0.6pt] ($(ae-1-6.north east)+(6ex,0)$) -- ++(-5mm, 0);
          \draw[line width=0.6pt] ($(ae-1-6.north east)+(6ex,0)$) -- ($(ae-12-6.south east)+(6ex,0)$) node[yshift=-1mm]{$\approx$};
          \draw[line width=0.6pt] ($(ae-13-6.north east)+(6ex,0)$) -- ($(ae-22-6.south east)+(6ex,0)$);
          \draw[line width=0.6pt] ($(ae-22-6.south east)+(6ex,0)$) -- ++(-5mm, 0);

          \begin{scope}[xshift=7cm]
            \matrix (be) [matrix of math nodes,
                left delimiter={[},
                right delimiter={]},
                minimum width=1cm,
                column sep=0.3ex,
                row sep=0.3ex,
                inner sep=2.5pt,
                ampersand replacement=\&]
            {
             1\\
             a_p(1)\\
             a_p(2)\\
             \mid\\
             \mid\\
             \mid\\
             \mid\\
             \mid\\
             a_p(p)\\
            };
        \end{scope}

        \begin{scope}[xshift = 9cm, right of=be]
            \matrix (ce) [matrix of math nodes,
                column 1/.style={anchor=west},
                %column 1/.style={anchor=east},
                minimum width=1cm,
                column sep=0.3ex,
                row sep=0.3ex,
                inner sep=2.5pt,
                ampersand replacement=\&]
            {
             e(0)\\
             e(1)\\
             e(2)\\
             \mid\\
             \mid\\
             \mid\\
             e(p - 1)\\
             e(p)\\
             \\
             e(p + 1)\\
             \mid\\
             \mid\\
             \mid\\
             \mid\\
             e(N - 1)\\
             e(N)\\
             \mid\\
             \mid\\
             \mid\\
             \mid\\
             \mid\\
             e(N - 1 + p)\\
            };

            % Left side delimiter
            \draw[line width=0.6pt] ($(ce-1-1.north west)-(6ex,0)$) -- ++(5mm, 0);
            \draw[line width=0.6pt] ($(ce-1-1.north west)-(6ex,0)$) -- ($(ce-12-1.south west)-(6ex,0)$) node[yshift=-1mm]{$\approx$};
            \draw[line width=0.6pt] ($(ce-13-1.north west)-(6ex,0)$) -- ($(ce-22-1.south west)-(6ex,0)$);
            \draw[line width=0.6pt] ($(ce-22-1.south west)-(6ex,0)$) -- ++(5mm, 0);

            % Right side delimiter
            \draw[line width=0.6pt] ($(ce-1-1.north east)+(6ex,0)$) -- ++(-5mm, 0);
            \draw[line width=0.6pt] ($(ce-1-1.north east)+(6ex,0)$) -- ($(ce-12-1.south east)+(6ex,0)$) node[yshift=-1mm]{$\approx$};
            \draw[line width=0.6pt] ($(ce-13-1.north east)+(6ex,0)$) -- ($(ce-22-1.south east)+(6ex,0)$);
            \draw[line width=0.6pt] ($(ce-22-1.south east)+(6ex,0)$) -- ++(-5mm, 0);

            % Right side lines
            \draw[line width=0.6pt] ($(ce-10-1.east)+(10ex,0)$) node[] {\textbullet} -- ($(ce-12-1.south east)+(10ex,0)$)
                node[right,xshift=1mm] {COVAR} node[yshift=-1mm] {$\approx$};
            \draw[line width=0.6pt] ($(ce-13-1.north east)+(10ex,0)$) -- ($(ce-15-1.east)+(10ex,0)$)
                node[] {\textbullet};
        \end{scope}
    \end{tikzpicture}
    \end{sideways}
\end{document}

其结果如下:

在此处输入图片描述

正如您在右侧矩阵中看到的,右侧分隔符和垂直线不是直的。我知道原因是什么,但不知道如何解决。我想为一列大小的矩阵定义两个锚点:一个在西,另一个在东。怎么做?

欢迎提出任何意见或建议,提前致谢

答案1

在这个答案中,我只关注最后一部分,只关注如何使线条笔直。(就我个人而言,我会采取不同的方式,用 LaTeX 命令制作括号,并添加一些 Ti顶部有 Z 注释。)主要信息包括:

  1. 加载positioning库以便更好、更简单地放置节点。
  2. 使用(x|-y)(和(x-|y)) 指令将节点放置在与相同的 x 坐标x和 y 坐标处y(反之亦然)。

    \documentclass{article}
    \usepackage{amsmath}
    \usepackage[margin=0.5in]{geometry}
    \usepackage{rotating}
    \usepackage{tikz}
    \usetikzlibrary{calc}
    \usetikzlibrary{matrix}
    \usetikzlibrary{decorations.pathreplacing}
    \usetikzlibrary{positioning} %<- added
    
    \begin{document}
        \begin{sideways}
            \begin{tikzpicture}[
                %%---------------------------------------
                %%---------------------------------------
              ]
              \matrix (ae) [matrix of nodes,
                            column 1/.style={anchor=west},
                            column 6/.style={anchor=east},
                            minimum width=1cm,
                            column sep=0.3ex,
                            row sep=0.3ex,
                            nodes in empty cells,
                            ]
              {
               $x(0)$ &  $0$   & $0$ & $---$ & $---$  & $0$ \\
               $x(1)$ & $x(0)$ & $0$ & $---$ & $---$  & $0$ \\
               $x(2)$ & $x(1)$ & $x(0)$ &       &       & $|$ \\
                $|$   &  $|$   &       &       &       & $|$\\
               $|$  &  $|$  &       &       &       & $|$\\
               $|$  &  $|$  &       &       &       & $|$\\
               $|$  &  $|$  &       &       &       & $|$\\
               $x(p-1)$ & $x(p-2)$ & $x(p-3)$ & $---$ & $x(0)$& $0$\\
               $x(p)$   & $x(p-1)$ & $x(p-2)$ & $---$ & $---$ & $x(0)$\\
               $x(p+1)$ & $x(p)$   & $x(p-1)$ & $---$ & $---$ & $x(1)$\\
               $|$ & $|$ & $|$ & & & $|$\\
               $|$ & $|$ & $|$ & & & $|$\\
               $|$ & $|$ & $|$ & & & $|$\\
               $|$ & $|$ & $|$ & & & $|$\\
               $x(N-1)$ & $x(N-2)$ & $x(N-3)$ & $---$ & $---$ & $x(N-1-p)$\\
               $0$ & $x(N-1)$ & $x(N-2)$ & $---$ & $---$ & $x(N-p)$\\
               $0$ & $0$ & $x(N-1)$ & $---$ & $---$ & $x(N-p+1)$\\
               $|$ & $|$ &   $|$    &       &       &   $|$\\
               $|$ & $|$ &   $|$    &       &       &   $|$\\
               $|$ & $|$ &   $|$    &       &       &   $|$\\
               $|$ & $|$ &   $|$    &       &       &   $|$\\
               $0$ & $0$ &   $0$    & $---$ & $---$ & $x(N-1)$\\
              };
    
              % Vertical lines at the left corner
              \draw[line width=0.6pt] ($(ae-1-1.west)-(10ex,0)$) node[] {\textbullet} -- node[left] {$p$}
                  ($(ae-7-1.south west)-(10ex,0)$) node[] {\textbullet};
              \draw[line width=0.6pt] ($(ae-10-1.west)-(10ex,0)$) node[] {\textbullet} -- ($(ae-12-1.south west)-(10ex,0)$)
                   node[left,xshift=-1mm] {$N - p$} node[yshift=-1mm] {$\approx$};
              \draw[line width=0.6pt] ($(ae-13-1.north west)-(10ex,0)$) -- ($(ae-15-1.west)-(10ex,0)$)
                   node[] {\textbullet};
              \draw[line width=0.6pt] ($(ae-16-1.west)-(10ex,0)$) node[] {\textbullet} -- node[left] {$p$}
                  ($(ae-22-1.west)-(10ex,0)$) node[] {\textbullet};
    
              % Left side matrix delimiter
              \draw[line width=0.6pt] ($(ae-1-1.north west)-(6ex,0)$) -- ++(5mm, 0);
              \draw[line width=0.6pt] ($(ae-1-1.north west)-(6ex,0)$) -- ($(ae-12-1.south west)-(6ex,0)$) node[yshift=-1mm]{$\approx$};
              \draw[line width=0.6pt] ($(ae-13-1.north west)-(6ex,0)$) -- ($(ae-22-1.south west)-(6ex,0)$);
              \draw[line width=0.6pt] ($(ae-22-1.south west)-(6ex,0)$) -- ++(5mm, 0);
    
              % Right side matrix delimiter
              \draw[line width=0.6pt] ($(ae-1-6.north east)+(6ex,0)$) -- ++(-5mm, 0);
              \draw[line width=0.6pt] ($(ae-1-6.north east)+(6ex,0)$) -- ($(ae-12-6.south east)+(6ex,0)$) node[yshift=-1mm]{$\approx$};
              \draw[line width=0.6pt] ($(ae-13-6.north east)+(6ex,0)$) -- ($(ae-22-6.south east)+(6ex,0)$);
              \draw[line width=0.6pt] ($(ae-22-6.south east)+(6ex,0)$) -- ++(-5mm, 0);
    
              \begin{scope}[xshift=7cm]
                \matrix (be) [matrix of math nodes,
                    left delimiter={[},
                    right delimiter={]},
                    minimum width=1cm,
                    column sep=0.3ex,
                    row sep=0.3ex,
                    inner sep=2.5pt,
                    ampersand replacement=\&]
                {
                 1\\
                 a_p(1)\\
                 a_p(2)\\
                 \mid\\
                 \mid\\
                 \mid\\
                 \mid\\
                 \mid\\
                 a_p(p)\\
                };
            \end{scope}
    
            \begin{scope}[xshift = 9cm, right of=be]
                \matrix (ce) [matrix of math nodes,
                    column 1/.style={anchor=west},
                    %column 1/.style={anchor=east},
                    minimum width=1cm,
                    column sep=0.3ex,
                    row sep=0.3ex,
                    inner sep=2.5pt,
                    ampersand replacement=\&]
                {
                 e(0)\\
                 e(1)\\
                 e(2)\\
                 \mid\\
                 \mid\\
                 \mid\\
                 e(p - 1)\\
                 e(p)\\
                 \\
                 e(p + 1)\\
                 \mid\\
                 \mid\\
                 \mid\\
                 \mid\\
                 e(N - 1)\\
                 e(N)\\
                 \mid\\
                 \mid\\
                 \mid\\
                 \mid\\
                 \mid\\
                 e(N - 1 + p)\\
                };
    
                % Left side delimiter
                \draw[line width=0.6pt] ($(ce-1-1.north west)-(6ex,0)$) -- ++(5mm, 0);
                \draw[line width=0.6pt] ($(ce-1-1.north west)-(6ex,0)$) -- ($(ce-12-1.south west)-(6ex,0)$) node[yshift=-1mm]{$\approx$};
                \draw[line width=0.6pt] ($(ce-13-1.north west)-(6ex,0)$) -- ($(ce-22-1.south west)-(6ex,0)$);
                \draw[line width=0.6pt] ($(ce-22-1.south west)-(6ex,0)$) -- ++(5mm, 0);
    
                % Right side delimiter
                \coordinate (rt) at ($(ce-1-1.north east)+(6ex,0)$);
                \coordinate (rb) at ($(ce-22-1.south east)+(6ex,0)$);
                \draw[line width=0.6pt] ($(rb)-(5mm,0)$) -- (rb) -- (rt-|rb)
                node[pos=0.47](app6){$\approx$}--
                ($(rt-|rb)-(5mm,0)$);
    %             \draw[line width=0.6pt] ($(ce-1-1.north east)+(6ex,0)$) -- ++(-5mm, 0);
    %             \draw[line width=0.6pt] ($(ce-1-1.north east)+(6ex,0)$) -- ($(ce-12-1.south east)+(6ex,0)$) node[yshift=-1mm]{$\approx$};
    %             \draw[line width=0.6pt] ($(ce-13-1.north east)+(6ex,0)$) -- ($(ce-22-1.south east)+(6ex,0)$);
    %             \draw[line width=0.6pt] ($(ce-22-1.south east)+(6ex,0)$) -- ++(-5mm, 0);
                \node[right=0.3cm of app6] (app7){$\approx$};
                % Right side lines
                \draw[line width=0.6pt] (ce-10-1-|app7) node[] {\textbullet} -- 
                (ce-15-1-|app7) node[] {\textbullet};
                \node[right=1mm of app7] {COVAR};
            \end{scope}
        \end{tikzpicture}
        \end{sideways}
    \end{document}
    

在此处输入图片描述

答案2

我将按以下方式编写矩阵表达式:

在此处输入图片描述

上述矩阵的代码更简单(也更短)。从数学方面来看,矩阵分隔符的不连续性和矩阵部分的范围的绘制符号都是多余的。矩阵内的点清楚地表明它们具有比所写的更多的行/列。甚至,删除所有这些修剪使数学表达式更“像数学”。

矩阵可以被视为节点。对于它们来说,所有锚点都被定义为具有矩形形状的节点。因此,您可以为完整矩阵定义其他选项,例如inner sep

母语:

%\documentclass{article}
\documentclass[margin=3mm]{standalone}
\usepackage{amsmath}
%\usepackage[margin=0.5in]{geometry}
%\usepackage{rotating}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
                calc,
                decorations.pathreplacing,
                matrix,
                positioning}

\begin{document}
%\begin{sideways}
    \begin{tikzpicture}[
node distance = 3ex,
   *-*/.style = {{Circle[length=2pt]}-{Circle[length=2pt]},
                 shorten <=0.5ex, shorten >=0.5ex}
                        ]
\matrix (ae) [inner sep=0pt,
            matrix of math nodes,
            nodes={text height=1.75ex, text depth=0.5ex,
                   inner sep=2pt, anchor=west},
            column 4/.append style={anchor=center},
            column 5/.append style={anchor=center},
            column 6/.append style={nodes={anchor=east}},
            column sep=0pt,
            row sep=3pt,
            nodes in empty cells,
            left delimiter={[},
            right delimiter={]}
            ]
{
x(0)    & 0         & 0         & \dotsm & \dotsm & 0               \\
x(1)    & x(0)      & 0         & \dotsm & \dotsm & 0               \\
x(2)    & x(1)      & x(0)      & \ddots &        & 0               \\
\vdots  & \vdots    & \vdots    &        & \ddots & \vdots          \\
x(p{-}1)& x(p{-}2)  & x(p{-}3)  & \dotsm & x(0)   & 0               \\
x(p)    & x(p-1)    & x(p{-}2)  & \dotsm & \dotsm & x(0)            \\
x(p{+}1)& x(p)      & x(p{-}1)  & \dotsm & \dotsm & x(1)            \\
\vdots  & \vdots    & \vdots    &        & \ddots & \vdots          \\
x(N{-}1)& x(N{-}2)  & x(N{-}3)  & \dotsm & \dotsm & x(N{-}1{-}p)    \\
0       & x(N{-}1)  & x(N{-}2)  & \dotsm & \dotsm & x(N{-}p)        \\
0       & 0         & x(N{-}1)  & \dotsm & \dotsm & x(N{-}p{+}1)    \\
\vdots  & \vdots    & \vdots    &        & \ddots & \vdots          \\
0       & 0         &   0       & \dotsm & \dotsm & x(N{-}1)\\
};
% vertical lines at the left side
\coordinate[left=1em of ae.west] (aux1); % ae.west is matrix ae west anchor
\draw[*-*]  (ae-1-1.north west -| aux1) -- node[left] {$p$}
            (ae-4-1.south west -| aux1);
\draw[*-*]  (ae-7-1.north west -| aux1) -- node[left] {$N{-}p$}% node {$\approx$}
            (ae-10-1.south west -| aux1);
\draw[*-*]  (ae-11-1.north west -| aux1) -- node[left] {$p$}
            (ae-13-1.south west -| aux1);
\matrix (be) [right=of ae,
            inner sep=0pt,
            matrix of math nodes,
            nodes={text height=1.75ex, text depth=0.5ex,
                   inner sep=2pt},
            row sep=3pt,
            nodes in empty cells,
            left delimiter={[},
            right delimiter={]}
            ]
{
1       \\
a_p(1)  \\
a_p(2)  \\
\vdots  \\
\vdots  \\
\vdots  \\
a_p(p)  \\
};
\matrix (ce) [right=of be,
            inner sep=0pt,
            matrix of math nodes,
            nodes={text height=1.75ex, text depth=0.5ex,
                   inner sep=2pt},
            row sep=3pt,
            nodes in empty cells,
            left delimiter={[},
            right delimiter={]}
            ]
{
e(0)        \\
e(1)        \\
e(2)        \\
\vdots      \\
e(p{-}1)    \\
e(p)        \\
e(p{+}1)    \\
\vdots      \\
e(N{-}1)    \\
e(N)        \\
\vdots      \\
e(N{-}1{+}p)\\
};
% vertical lines at the right side
\coordinate[right=1em of ce.east] (aux1);%  ce.east is matrix ce east anchor
\draw[*-*]  (ce-7-1.north west -| aux1) -- node[right] {COVAR}
            (ce-9-1.south west -| aux1);
  \end{tikzpicture}
%\end{sideways}
\end{document}

答案3

您还可以使用命名的本地边界框作为范围。我只更改了部分代码。坦率地说,我不知道您在这里想要完成什么。

\documentclass{article}
\usepackage{amsmath}
\usepackage[margin=0.5in]{geometry}
\usepackage{rotating}
\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{matrix}
\usetikzlibrary{decorations.pathreplacing}

\begin{document}
    \begin{sideways}
        \begin{tikzpicture}[
            %%---------------------------------------
            %%---------------------------------------
          ]
          \matrix (ae) [matrix of nodes,
                        column 1/.style={anchor=west},
                        column 6/.style={anchor=east},
                        minimum width=1cm,
                        column sep=0.3ex,
                        row sep=0.3ex,
                        nodes in empty cells,
                        ]
          {
           $x(0)$ &  $0$   & $0$ & $---$ & $---$  & $0$ \\
           $x(1)$ & $x(0)$ & $0$ & $---$ & $---$  & $0$ \\
           $x(2)$ & $x(1)$ & $x(0)$ &       &       & $|$ \\
            $|$   &  $|$   &       &       &       & $|$\\
           $|$  &  $|$  &       &       &       & $|$\\
           $|$  &  $|$  &       &       &       & $|$\\
           $|$  &  $|$  &       &       &       & $|$\\
           $x(p-1)$ & $x(p-2)$ & $x(p-3)$ & $---$ & $x(0)$& $0$\\
           $x(p)$   & $x(p-1)$ & $x(p-2)$ & $---$ & $---$ & $x(0)$\\
           $x(p+1)$ & $x(p)$   & $x(p-1)$ & $---$ & $---$ & $x(1)$\\
           $|$ & $|$ & $|$ & & & $|$\\
           $|$ & $|$ & $|$ & & & $|$\\
           $|$ & $|$ & $|$ & & & $|$\\
           $|$ & $|$ & $|$ & & & $|$\\
           $x(N-1)$ & $x(N-2)$ & $x(N-3)$ & $---$ & $---$ & $x(N-1-p)$\\
           $0$ & $x(N-1)$ & $x(N-2)$ & $---$ & $---$ & $x(N-p)$\\
           $0$ & $0$ & $x(N-1)$ & $---$ & $---$ & $x(N-p+1)$\\
           $|$ & $|$ &   $|$    &       &       &   $|$\\
           $|$ & $|$ &   $|$    &       &       &   $|$\\
           $|$ & $|$ &   $|$    &       &       &   $|$\\
           $|$ & $|$ &   $|$    &       &       &   $|$\\
           $0$ & $0$ &   $0$    & $---$ & $---$ & $x(N-1)$\\
          };

          % Vertical lines at the left corner
          \draw[line width=0.6pt] ($(ae-1-1.west)-(10ex,0)$) node[] {\textbullet} -- node[left] {$p$}
              ($(ae-7-1.south west)-(10ex,0)$) node[] {\textbullet};
          \draw[line width=0.6pt] ($(ae-10-1.west)-(10ex,0)$) node[] {\textbullet} -- ($(ae-12-1.south west)-(10ex,0)$)
               node[left,xshift=-1mm] {$N - p$} node[yshift=-1mm] {$\approx$};
          \draw[line width=0.6pt] ($(ae-13-1.north west)-(10ex,0)$) -- ($(ae-15-1.west)-(10ex,0)$)
               node[] {\textbullet};
          \draw[line width=0.6pt] ($(ae-16-1.west)-(10ex,0)$) node[] {\textbullet} -- node[left] {$p$}
              ($(ae-22-1.west)-(10ex,0)$) node[] {\textbullet};

          % Left side matrix delimiter
          \draw[line width=0.6pt] ($(ae-1-1.north west)-(6ex,0)$) -- ++(5mm, 0);
          \draw[line width=0.6pt] ($(ae-1-1.north west)-(6ex,0)$) -- ($(ae-12-1.south west)-(6ex,0)$) node[yshift=-1mm]{$\approx$};
          \draw[line width=0.6pt] ($(ae-13-1.north west)-(6ex,0)$) -- ($(ae-22-1.south west)-(6ex,0)$);
          \draw[line width=0.6pt] ($(ae-22-1.south west)-(6ex,0)$) -- ++(5mm, 0);

          % Right side matrix delimiter
          \draw[line width=0.6pt] ($(ae-1-6.north east)+(6ex,0)$) -- ++(-5mm, 0);
          \draw[line width=0.6pt] ($(ae-1-6.north east)+(6ex,0)$) -- ($(ae-12-6.south east)+(6ex,0)$) node[yshift=-1mm]{$\approx$};
          \draw[line width=0.6pt] ($(ae-13-6.north east)+(6ex,0)$) -- ($(ae-22-6.south east)+(6ex,0)$);
          \draw[line width=0.6pt] ($(ae-22-6.south east)+(6ex,0)$) -- ++(-5mm, 0);

          \begin{scope}[xshift=7cm]
            \matrix (be) [matrix of math nodes,
                left delimiter={[},
                right delimiter={]},
                minimum width=1cm,
                column sep=0.3ex,
                row sep=0.3ex,
                inner sep=2.5pt,
                ampersand replacement=\&]
            {
             1\\
             a_p(1)\\
             a_p(2)\\
             \mid\\
             \mid\\
             \mid\\
             \mid\\
             \mid\\
             a_p(p)\\
            };
        \end{scope}

        \begin{scope}[xshift = 9cm, right of=be,local bounding box=vector A]
            \matrix (ce) [matrix of math nodes,
                column 1/.style={anchor=west},
                %column 1/.style={anchor=east},
                minimum width=1cm,
                column sep=0.3ex,
                row sep=0.3ex,
                inner sep=2.5pt,
                ampersand replacement=\&]
            {
             e(0)\\
             e(1)\\
             e(2)\\
             \mid\\
             \mid\\
             \mid\\
             e(p - 1)\\
             e(p)\\
             \\
             e(p + 1)\\
             \mid\\
             \mid\\
             \mid\\
             \mid\\
             e(N - 1)\\
             e(N)\\
             \mid\\
             \mid\\
             \mid\\
             \mid\\
             \mid\\
             e(N - 1 + p)\\
            };
          \end{scope}

          % Left side delimiter
          \draw[line width=0.6pt] (vector A.north west)++(5mm, 0) -- (vector A.north west)
            -- (vector A.south west) node[yshift=-1mm, midway]{$\approx$} -- ++(5mm, 0);

          % right side delimiter
          \draw[line width=0.6pt] (vector A.north east)++(-5mm, 0) -- (vector A.north east)
            -- (vector A.south east) node[yshift=-1mm, midway]{$\approx$} -- ++(-5mm, 0);

          % Right side lines
          \draw[line width=0.6pt] ($(ce-10-1.east)+(10ex,0)$) node[] {\textbullet} -- ($(ce-12-1.south east)+(10ex,0)$)
              node[right,xshift=1mm] {COVAR} node[yshift=-1mm] {$\approx$};
          \draw[line width=0.6pt] ($(ce-13-1.north east)+(10ex,0)$) -- ($(ce-15-1.east)+(10ex,0)$)
              node[] {\textbullet};
    \end{tikzpicture}
    \end{sideways}
\end{document}

演示

相关内容