我正在尝试用矩阵来表示。
我现在有的是:
但我想要这个。
使用 tikz 的解决方案可能会更好。
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}
\usepackage[left=1.00cm, right=1.00cm]{geometry}
\begin{document}
\begin{equation}
\left(
\begin{array}{*6{c}}
x_1^{(1)} & x_1^{(2)} & \cdots & x_1^{(i)} & \cdots & x_1^{(p)}\\\\
\vdots & \vdots & \vdots & \vdots & \vdots & \vdots\\\\
x_k^{(1)} & x_k^{(2)} & \cdots & x_k^{(i)} & \cdots & x_k^{(p)}\\\\
\vdots & \vdots & \vdots & \vdots & \vdots & \vdots\\\\
x_n^{(1)} & x_n^{(2)} & \cdots & x_n^{(i)} & \cdots & x_n^{(p)}\\
\end{array}
\right) \leftarrow \text{Text} \\
\end{equation}
\end{document}
答案1
通过使用 tikz 进行“绘图”:
\documentclass[12pt,a4paper]{article}
\usepackage[hmargin=1cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{amsmath, amssymb}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, matrix, positioning}
\begin{document}
\begin{equation}
\begin{tikzpicture}[baseline,
node distance=1em,
every pin/.append style={pin edge={Straight Barb-,semithick, black},
pin distance=9mm, align=left}
]
\matrix (m) [matrix of math nodes,
column sep=1ex,
row sep=1ex,
left delimiter=(,
right delimiter=),
inner sep=1pt
]
{
x_1^{(1)} & x_1^{(2)} & \cdots & x_1^{(i)} & \cdots & x_1^{(p)}\\
\vdots & \vdots & \vdots & \vdots & \vdots & \vdots\\
x_k^{(1)} & x_k^{(2)} & \cdots & x_k^{(i)} & \cdots & x_k^{(p)}\\
\vdots & \vdots & \vdots & \vdots & \vdots & \vdots\\
x_n^{(1)} & x_n^{(2)} & \cdots & x_n^{(i)} & \cdots & x_n^{(p)}\\
};
\coordinate [pin=right:text,right=of m.east] (aux);
\coordinate [pin=below:text,below=of m-4-4.south |- m.south] {};
\end{tikzpicture}
\end{equation}
\end{document}
答案2
像这样?我只是用了堆栈。
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}
\usepackage[left=1.00cm, right=1.00cm]{geometry}
\usepackage{stackengine}
\stackMath
\def\QQ{\phantom{x_1^{(1)}}}
\begin{document}
\begin{equation}
\stackunder{
\left(
\begin{array}{*6{c}}
x_1^{(1)} & x_1^{(2)} & \cdots & x_1^{(i)} & \cdots & x_1^{(p)}\\\\
\vdots & \vdots & \vdots & \vdots & \vdots & \vdots\\\\
x_k^{(1)} & x_k^{(2)} & \cdots & x_k^{(i)} & \cdots & x_k^{(p)}\\\\
\vdots & \vdots & \vdots & \vdots & \vdots & \vdots\\\\
x_n^{(1)} & x_n^{(2)} & \cdots & x_n^{(i)} & \cdots & x_n^{(p)}\\
\end{array}
\right)
}{
\begin{array}{*6{c}}
\QQ&\QQ&\QQ&\stackunder{\uparrow}{\mathclap{\text{Text goes here}}}&\QQ&\QQ
\end{array}}
\leftarrow \text{Text} \\
\end{equation}
\end{document}