! 缺少插入 $。$ \end{多行}

! 缺少插入 $。$ \end{多行}
\nabla L(\boldsymbol {\beta})=
\mbox{
\Large
\begin{pmatrix}
\frac{\partial r_1}{\partial\beta_1}\\
\frac{\partial r_1}{\partial\beta_2}\\
\vdots \\
\frac{\partial r_1}{\partial\beta_n}
\end{pmatrix}
} \cdot
r_1(\boldsymbol{\beta}) + \cdots +
\mbox{
\Large
\begin{pmatrix}
\frac{\partial r_m}{\partial\beta_1}\\
\frac{\partial r_m}{\partial\beta_2}\\
\vdots \\
\frac{\partial r_m}{\partial\beta_n}
\end{pmatrix}
}\cdot
r_m(\boldsymbol{\beta}) = \\
= \mbox{
\Large
\begin{pmatrix}
\frac{\partial r_1}{\partial\beta_1} & \cdots & \frac{\partial r_m}{\partial\beta_1}\\
\frac{\partial r_1}{\partial\beta_2} & \cdots & \frac{\partial r_m}{\partial\beta_2}\\
\vdots & \huge{\ddots} & \vdots\\
\frac{\partial r_1}{\partial\beta_n} & \cdots & \frac{\partial r_m}{\partial\beta_n}
\end{pmatrix}
}
\mbox{
\large
\begin{pmatrix}
r_1(\boldsymbol{\beta})\\[1.4ex]
r_2(\boldsymbol{\beta})\\[1.4ex]
\huge{\vdots}\\[1.4ex]
r_m(\boldsymbol{\beta})
\end{pmatrix}
}
=J_{\boldsymbol{r}}(\boldsymbol{\beta}) ^{\mathrm{T}} \boldsymbol{r} (\boldsymbol{\beta})
\end{multline} \\

我不知道如何解决这个问题。实际上我不知道应该把那个 $ 插入到哪里。

答案1

\mbox默认情况下,的参数以文本模式而不是数学模式处理。因此,所有警告消息,因为pmatrix环境必须在数学模式下处理。补救措施?删除 all\mbox和 all \large\Large\huge语句。真的!

我还将multline用组合的equation/aligned[b]环境替换该环境。

如果您想要更大的分数项,请使用;参见以下屏幕截图中的公式 (2)。话虽\dfrac如此\frac,我认为您最好将雅可比项切换到内联分数符号;参见下面的公式 (3)。

在此处输入图片描述

\documentclass{article} 
\usepackage{amsmath,bm}

\begin{document} 

%% first version: \frac, \arraystretch=1.333
\begin{equation}
\renewcommand\arraystretch{1.333}
\begin{aligned}[b]
\nabla L(\bm {\beta})
&=
\begin{pmatrix}
\frac{\partial r_1}{\partial\beta_1}\\
\frac{\partial r_1}{\partial\beta_2}\\
\vdots \\
\frac{\partial r_1}{\partial\beta_n}
\end{pmatrix}
\cdot
r_1(\bm{\beta}) 
+ \dots +
\begin{pmatrix}
\frac{\partial r_m}{\partial\beta_1}\\
\frac{\partial r_m}{\partial\beta_2}\\
\vdots \\
\frac{\partial r_m}{\partial\beta_n}
\end{pmatrix}
\cdot
r_m(\bm{\beta}) \\
&= 
\begin{pmatrix}
\frac{\partial r_1}{\partial\beta_1} & \cdots & \frac{\partial r_m}{\partial\beta_1}\\
\frac{\partial r_1}{\partial\beta_2} & \cdots & \frac{\partial r_m}{\partial\beta_2}\\
\vdots & \ddots & \vdots\\
\frac{\partial r_1}{\partial\beta_n} & \cdots & \frac{\partial r_m}{\partial\beta_n}
\end{pmatrix}
\begin{pmatrix}
r_1(\bm{\beta})\\
r_2(\bm{\beta})\\
\vdots\\
r_m(\bm{\beta})
\end{pmatrix}
=J_{\bm{r}}(\bm{\beta}) ^{\mathrm{T}} \bm{r} (\bm{\beta})
\end{aligned}
\end{equation}
\hrule
\medskip

%% second version: \dfrac, \arraystretch=1.75
\begin{equation}
\renewcommand\arraystretch{1.75}
\begin{aligned}[b]
\nabla L(\bm {\beta})
&=
\begin{pmatrix}
\dfrac{\partial r_1}{\partial\beta_1}\\
\dfrac{\partial r_1}{\partial\beta_2}\\
\vdots \\
\dfrac{\partial r_1}{\partial\beta_n}
\end{pmatrix}
\cdot
r_1(\bm{\beta}) 
+ \dots +
\begin{pmatrix}
\dfrac{\partial r_m}{\partial\beta_1}\\
\dfrac{\partial r_m}{\partial\beta_2}\\
\vdots \\
\dfrac{\partial r_m}{\partial\beta_n}
\end{pmatrix}
\cdot
r_m(\bm{\beta}) \\
&= 
\begin{pmatrix}
\dfrac{\partial r_1}{\partial\beta_1} & \cdots & \dfrac{\partial r_m}{\partial\beta_1}\\
\dfrac{\partial r_1}{\partial\beta_2} & \cdots & \dfrac{\partial r_m}{\partial\beta_2}\\
\vdots & \ddots & \vdots\\
\dfrac{\partial r_1}{\partial\beta_n} & \cdots & \dfrac{\partial r_m}{\partial\beta_n}
\end{pmatrix}
\begin{pmatrix}
r_1(\bm{\beta})\\
r_2(\bm{\beta})\\
\vdots\\
r_m(\bm{\beta})
\end{pmatrix}
=J_{\bm{r}}(\bm{\beta}) ^{\mathrm{T}} \bm{r} (\bm{\beta})
\end{aligned}
\end{equation}
\hrule


%% third version: inline-style fraction notation, \arraystretch=1.0 (the default)
\begin{equation}
\begin{aligned}[b]
\nabla L(\bm {\beta})
&=
\begin{pmatrix}
\partial r_1/\partial\beta_1 \\
\partial r_1/\partial\beta_2 \\
\vdots \\
\partial r_1/\partial\beta_n
\end{pmatrix}
r_1(\bm{\beta}) 
+ \dots +
\begin{pmatrix}
\partial r_m/\partial\beta_1\\
\partial r_m/\partial\beta_2\\
\vdots \\
\partial r_m/\partial\beta_n
\end{pmatrix}
r_m(\bm{\beta}) \\
&= 
\begin{pmatrix}
\partial r_1/\partial\beta_1 & \cdots & \partial r_m/\partial\beta_1\\
\partial r_1/\partial\beta_2 & \cdots & \partial r_m/\partial\beta_2\\
\vdots & \ddots & \vdots\\
\partial r_1/\partial\beta_n & \cdots & \partial r_m/\partial\beta_n
\end{pmatrix}
\begin{pmatrix}
r_1(\bm{\beta})\\
r_2(\bm{\beta})\\
\vdots\\
r_m(\bm{\beta})
\end{pmatrix}
=J_{\bm{r}}(\bm{\beta}) ^{\mathrm{T}} \bm{r} (\bm{\beta})
\end{aligned}
\end{equation}

\end{document}

相关内容