方程标签错误

方程标签错误

我目前正在尝试引用一个方程数组,但奇怪的是它引用的是下一个方程(见图)。有人能帮帮我吗?

我正在使用以下代码:

Considering a logarithmic transformation, the P-wave signal $p[n]$ and its Gaussian model $\hat{p}[n]$ were related as:
\begin{eqnarray}
ln(p[n])&=&ln(\hat{p}[n]) 
\\\nonumber &=&ln(A) - \bigg(\frac{n-C}{W}\bigg)^2 \label{eq:log_gauss}
\end{eqnarray}
Defining the variables $b=ln(p[n])$, $a_2=-1/W^2$, $a_1=2C/W^2$, and $a_0=ln(A)-(C/W)^2$, Equation \ref{eq:log_gauss} can be written as a second-order polynomial:
\begin{eqnarray}
b&=&-\frac{1}{W^2}n^2+\frac{2C}{W^2}n+ln(A)-\bigg(\frac{C}{W}\bigg)^2
\\\nonumber &=&a_2n^2+a_1n+a_0
\end{eqnarray}
Considering discrete values of $n$, coefficients $a_2$, $a_1$, and $a_0$ can be obtained by solving the following system of linear equation:

答案1

的放置\nonumber錯誤。

然而,你应该绝不使用eqnarray。除了在等号周围产生错误的空格外,它没有与合作hyperref

我建议使用split,因为您指的是整个方程式而不仅仅是一行。

\documentclass{article}
\usepackage{amsmath}

\begin{document}

Considering a logarithmic transformation, the $P$\nobreakdash-wave signal 
$p[n]$ and its Gaussian model $\hat{p}[n]$ were related as
\begin{equation} \label{eq:log_gauss}
\begin{split}
\ln(p[n])
&=\ln(\hat{p}[n]) 
\\
&=\ln(A) - \biggl(\frac{n-C}{W}\biggr)^{\!2}
\end{split}
\end{equation}
Defining the variables $b=\ln(p[n])$, $a_2=-1/W^2$, $a_1=2C/W^2$, 
and $a_0=\ln(A)-(C/W)^2$, Equation \ref{eq:log_gauss} can be written as 
a second-order polynomial
\begin{equation}
\begin{split}
b&=
-\frac{1}{W^2}n^2+\frac{2C}{W^2}n+\ln(A)-\biggl(\frac{C}{W}\biggr)^{\!2}
\\
&=a_2n^2+a_1n+a_0
\end{split}
\end{equation}
Considering discrete values of $n$, coefficients $a_2$, $a_1$, and $a_0$ 
can be obtained by solving the following system of linear equations

\end{document}

注意\ln,不要使用ln。还应使用\biggl(\biggr),而应使用\bigg而非 。

在此处输入图片描述

答案2

正如@marmot 正确指出的那样,我不想窃取他的功劳,你必须\nonumber在之前移动命令\\并使用\ln对数命令,而不仅仅是写 ln。

我写这个答案是为了让像我一样遇到相同(或类似)问题的人知道问题已经得到解决。

相关内容