矩阵形式有误?

矩阵形式有误?

我在报告中写了这个矩阵:

  \begin{align}
  \mathbf{x}=
  \begin{pmatrix}
  1 & 1 & 1 & 1 & 0 & 1 & 1 & 0 & 1 & 0 & 0 & 1 & 0 & 0 & 0 & 0\\
  1 & 1 & 1 & 0 & 1 & 1 & 0 & 1 & 0 & 1 & 0 & 0 & 1 & 0 & 0 & 0\\
  1 & 1 & 0 & 1 & 1 & 0 & 1 & 1 & 0 & 0 & 1 & 0 & 0 & 1 & 0 & 0\\
  1 & 0 & 1 & 1 & 1 & 0 & 1 & 0 & 1 & 1 & 1 & 0 & 0 & 0 & 1 & 0
  \end{pmatrix}^\mathrm{T},
  \end{align}

我发现错误pdfLatex> ! Extra alignment tab has been changed to \cr

答案1

来自amsldoc手册:

The maximum number of columns in a matrix is determined by the counter 
MaxMatrixCols (normal value = 10), which you can change if necessary 
using LATEX’s \setcounter or \addtocounter commands.

因此你需要:

\setcounter{MaxMatrixCols}{20}
\begin{align}
  \mathbf{x}=
  \begin{pmatrix}
  1 & 1 & 1 & 1 & 0 & 1 & 1 & 0 & 1 & 0 & 0 & 1 & 0 & 0 & 0 & 0\\
  1 & 1 & 1 & 0 & 1 & 1 & 0 & 1 & 0 & 1 & 0 & 0 & 1 & 0 & 0 & 0\\
  1 & 1 & 0 & 1 & 1 & 0 & 1 & 1 & 0 & 0 & 1 & 0 & 0 & 1 & 0 & 0\\
  1 & 0 & 1 & 1 & 1 & 0 & 1 & 0 & 1 & 1 & 1 & 0 & 0 & 0 & 1 & 0\\
  \end{pmatrix}^\mathrm{T},
\end{align}

(您似乎只有 16 列,但为了以防万一,还是给您额外 4 列:)

相关内容