在存在其他矩阵的情况下标记矩阵的行

在存在其他矩阵的情况下标记矩阵的行

我有多个彼此相邻的矩阵。我想在右侧标记矩阵的行(矩阵外部的标签)。例如,我想将这些条件 \eqref{eq4}矩阵之外。

\documentclass{article}
\usepackage{amsmath}
\usepackage{pdflscape}

\begin{document}
\setcounter{MaxMatrixCols}{40}
\begin{landscape}
\[
\begin{bmatrix}
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
 &  &  &  & \ddots &  &  &  &  & \ddots &  &  &  &  & \ddots &  &  &  &  & \ddots & \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
 &  &  &  & \ddots &  &  &  &  & \ddots &  &  &  &  & \ddots &  &  &  &  & \ddots & \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
 &  &  &  & \ddots &  &  &  &  & \ddots &  &  &  &  & \ddots &  &  &  &  & \ddots & \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
 &  &  &  & \ddots &  &  &  &  & \ddots &  &  &  &  & \ddots &  &  &  &  & \ddots & \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
 &  &  &  & \ddots &  &  &  &  & \ddots &  &  &  &  & \ddots &  &  &  &  & \ddots & \\
 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
\end{bmatrix}
%
\begin{bmatrix}
x_{00}\\
x_{01}\\
x_{02}\\
x_{03}\\
\vdots\\
x_{10}\\
x_{11}\\
x_{12}\\
x_{13}\\
\vdots\\
x_{(10)0}\\
x_{(10)1}\\
x_{(10)2}\\
x_{(10)3}\\
\vdots\\
w_0\\
w_1\\
w_2\\
w_3\\
\vdots\\
w_{10}
\end{bmatrix}
%
\begin{bmatrix}
\leq 1 & \text{Con} \eqref{eq4}\\
\leq 1 & \text{Con} \eqref{eq4}\\
\leq 1 \\
\vdots\\
\leq 1\\
\leq 1\\
\leq 1\\
\vdots\\
=1\\
=1\\
=0\\
=0\\
=0\\
=0\\
\vdots\\
\geq g_1-M\\
\geq g_2-M\\
\geq g_3-M\\
\vdots\\
=0\\
\leq C_1\\
\leq C_1\\
\leq C_1\\
\vdots\\
\leq C_1\\
\end{bmatrix}
\]
\end{landscape}
\end{document}

答案1

如果您使用“长堆栈”(具有固定的基线跳过)作为tabstackengine包的一部分,则将多个列向量设置为右侧将自动垂直对齐。 \<prefix>Matrixstack\<prefix>Vectorstack是长堆栈的实例,其中<prefix>可以留空或paren,或。bracketvertbrace

可以设置列间间隙和行间基线跳跃。

\documentclass{article}
\usepackage{amsmath}
\usepackage{pdflscape}
\usepackage{tabstackengine}
\begin{document}
\setcounter{MaxMatrixCols}{40}
\begin{landscape}
\setstackgap{L}{1.1\normalbaselineskip}% INTER-ROW BASELINESKI{P
\setstacktabbedgap{8pt}% INTER-COLUMN GAP
\[
\bracketMatrixstack{
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
 &  &  &  & \ddots &  &  &  &  & \ddots &  &  &  &  & \ddots &  &  &  &  & \ddots & \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
 &  &  &  & \ddots &  &  &  &  & \ddots &  &  &  &  & \ddots &  &  &  &  & \ddots & \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
 &  &  &  & \ddots &  &  &  &  & \ddots &  &  &  &  & \ddots &  &  &  &  & \ddots & \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
 &  &  &  & \ddots &  &  &  &  & \ddots &  &  &  &  & \ddots &  &  &  &  & \ddots & \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 \\
 &  &  &  & \ddots &  &  &  &  & \ddots &  &  &  &  & \ddots &  &  &  &  & \ddots & \\
 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0 & 0 & 0 & 0 & \ldots & 0
}
%
\bracketVectorstack{
x_{00}\\
x_{01}\\
x_{02}\\
x_{03}\\
\vdots\\
x_{10}\\
x_{11}\\
x_{12}\\
x_{13}\\
\vdots\\
x_{(10)0}\\
x_{(10)1}\\
x_{(10)2}\\
x_{(10)3}\\
\vdots\\
w_0\\
w_1\\
w_2\\
w_3\\
\vdots\\
w_{10}
}
%
\bracketVectorstack{
\leq 1 \\
\leq 1 \\
\leq 1 \\
\vdots\\
\leq 1\\
\leq 1\\
\leq 1\\
\vdots\\
=1\\
=1\\
=0\\
=0\\
=0\\
=0\\
\vdots\\
\geq g_1-M\\
\geq g_2-M\\
\geq g_3-M\\
\vdots\\
=0\\
\leq C_1\\
\leq C_1\\
\leq C_1\\
\vdots\\
\leq C_1
}
\Vectorstack{
\text{Con} \eqref{eq4}\\
\text{Con} \eqref{eq4}\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
}
\]
\end{landscape}
\end{document}

在此处输入图片描述

相关内容