我在引用方程式时遇到问题。我使用两个方程式环境,一个是对齐,另一个是案例。下面是给出的代码:
Cost Function of Dual Dispersion MCMA is:\\
\begin{align}
J_{DD-MCMA}=&E\left[(|y_R(n )|^2 - R_{VR})^2\right]+\\
&E\left[(|y_I(n )|^2 - R_{VI})^2\right] \nonumber
\label{cf:ddmcma}
\end{align}
The dispersion constants RVR and RVI is chosen based on following criteria as given automatically during the execution of algorithm :
\begin{align}
R_{VR}&=
\begin{cases}
RR1 &\text{if $y_{R}(n)^2\:\leq\: RR1$ } \\
RR2 &\text{if $y_{R}(n)^2\:\leq\: RR2$ } \\
RR2 &\text{otherwise}
\end{cases} \\
R_{VI}&=
\begin{cases}
RI1 &\text{if $y_{I}(n)^2\:\leq\: RI1$ } \\
RI2 &\text{if $y_{I}(n)^2\:\leq\: RI2$ } \\
RI2 &\text{otherwise}
\end{cases}
\label{dc:ddmcma}
\end{align}
当我试图引用它就像
\par In order to obtain the stochastic gradient adaptive algorithm tap update equation, we differentiate the cost function in equation \eqref{cf:ddmcma} with respect to equalizer tap weight vector w and approximating the expectation with
the instantaneous values gives
LATEX 的输出打印了case环境中方程的方程编号,正如我所提到的,要从对齐折磨者方程中显示的方程编号。例如,如果对齐环境方程编号是11并且案例环境方程数为12和十三然后方程引用显示12代替11。 请帮忙。
答案1
您的问题是\nonumber
放置\label
在第一个方程中的命令之前的命令。
尝试这样做:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Cost Function of Dual Dispersion MCMA is:
\begin{align}
J_{DD-MCMA}=&E\left[(|y_R(n )|^2 - R_{VR})^2\right]+\label{cf:ddmcma}\\
&E\left[(|y_I(n )|^2 - R_{VI})^2\right] \nonumber
\end{align}
The dispersion constants RVR and RVI is chosen based on following criteria as given automatically during the execution of algorithm :
\begin{align}
R_{VR}=&
\begin{cases}
RR1 &\text{if $y_{R}(n)^2\:\leq\: RR1$ } \\
RR2 &\text{if $y_{R}(n)^2\:\leq\: RR2$ } \\
RR2 &\text{otherwise}
\end{cases} \\
R_{VI}=&
\begin{cases}
RI1 &\text{if $y_{I}(n)^2\:\leq\: RI1$ } \\
RI2 &\text{if $y_{I}(n)^2\:\leq\: RI2$ } \\
RI2 &\text{otherwise}
\end{cases}
\label{dc:ddmcmb}
\end{align}
Eq \ref{cf:ddmcma} and \ref{dc:ddmcmb}
\end{document}
现在第一个参考是关于数字(1)而不是未编号的(所以下一个)等式......
答案2
\label
您在行后使用\nonumber
(因此无法通过编号引用)。只需将其放入编号行中(或之前):
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Cost Function of Dual Dispersion MCMA is:\\
\begin{align}
J_{DD-MCMA}={}&E\left[(|y_R(n )|^2 - R_{VR})^2\right]+\label{cf:ddmcma}\\
&E\left[(|y_I(n )|^2 - R_{VI})^2\right] \nonumber
\end{align}
The dispersion constants RVR and RVI is chosen based on following criteria as given automatically during the execution of algorithm :
\begin{align}
R_{VR}&=
\begin{cases}
RR1 &\text{if $y_{R}(n)^2\:\leq\: RR1$ } \\
RR2 &\text{if $y_{R}(n)^2\:\leq\: RR2$ } \\
RR2 &\text{otherwise}
\end{cases} \\
R_{VI}&=
\begin{cases}
RI1 &\text{if $y_{I}(n)^2\:\leq\: RI1$ } \\
RI2 &\text{if $y_{I}(n)^2\:\leq\: RI2$ } \\
RI2 &\text{otherwise}
\end{cases}
\label{dc:ddmcma}
\end{align}
\par In order to obtain the stochastic gradient adaptive algorithm tap update equation, we differentiate the cost function in equation \eqref{cf:ddmcma} with respect to equalizer tap weight vector w and approximating the expectation with
the instantaneous values gives
\end{document}
答案3
正如其他答案已经指出的那样,\nonumber
第一个align
环境中的指令是问题的直接原因。
除了省略不需要的\nonumber
指令外,您可能还想考虑替换整个第一个align
环境,因为换行既不必要也不要求。另一方面,请花点时间将各种常量和首字母缩略词(例如DD-MCMA
)排版得更有吸引力。
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\E}{E} % expectation operator (?)
\newcommand\vn[1]{\textit{#1}} % "variable name"
\begin{document}
Cost function of Dual Dispersion MCMA is:
\begin{equation} \label{cf:ddmcma}
J_{\vn{DD-MCMA}}=
\E\bigl[(|y^{}_{R}(n)|^2 - R_{\vn{VR}})^2\bigr]+
\E\bigl[(|y^{}_{I}(n)|^2 - R_{\vn{VI}})^2\bigr]
\end{equation}
The dispersion constants $R_{\vn{VR}}$ and
$R_{\vn{VI}}$ are chosen based on following
criteria as given automatically during the
execution of algorithm:
\begin{align}
R_{\vn{VR}} &=
\begin{cases}
RR1 &\text{if $y^{}_{R}(n)^2\leq RR1$} \\
RR2 &\text{if $y^{}_{R}(n)^2\leq RR2$} \\
RR2 &\text{otherwise}
\end{cases} \label{dc:ddmcmb} \\
R_{\vn{VI}} &=
\begin{cases}
RI1 &\text{if $y^{}_{I}(n)^2\leq RI1$} \\
RI2 &\text{if $y^{}_{I}(n)^2\leq RI2$} \\
RI2 &\text{otherwise}
\end{cases} \label{dc:ddmcmc}
\end{align}
Equations \eqref{cf:ddmcma} and \eqref{dc:ddmcmc} \dots
\end{document}