1

I occurred a problem recently, but, I donot know how to solve it?

Error:

Undefined control sequence.
l.26 $$\eqalignno
                 {P^{-1}&=P_{1}^{-1}+P_{2}^{-1}\cr P^{-1}\mathhat{x}&=P_{1}^...

My codes:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
 $$\eqalignno{P^{-1}&=P_{1}^{-1}+P_{2}^{-1}\cr P^{-1}\mathhat{x}&=P_{1}^{-1}\mathhat{x}_{1}+P_{2}^{-1}\mathhat{x}_{2}.&\hbox{(7)}}$$
\end{document}

1 Answer 1

1

Is this you want?

\documentclass{article}
\usepackage{amsmath,amssymb}
\begin{document}
 \begin{align}
 \begin{aligned}
 P^{-1}           &=P_{1}^{-1}+P_{2}^{-1}\\
 P^{-1}\hat{x}&=P_{1}^{-1}\hat{x}_{1}+P_{2}^{-1}\hat{x}_{2}%.(7)
 \end{aligned}
 \end{align}
\end{document}

enter image description here

Actually, I should admit that I don't understand your code (\eqalignno and \mathhat). And in latex, don't use $$.

3
  • 1
    \eqalignno is macro from plainTeX, but \mathhat is unknown. The construction looks like plain TeX and the first three lines and the last line of OP's code is only something like curiosity.
    – wipet
    Commented Apr 8, 2015 at 13:17
  • Yes, thank you, you solved my problems. It seems I mix the Tex codes with Latex environment, see this, tex.stackexchange.com/a/55694/44227.
    – wayne
    Commented Apr 8, 2015 at 13:17
  • @wipet You are right, actually, I copy this code from TEX Source of an IEEE paper which is a Full Text in HTML version in order to be used in my paper.
    – wayne
    Commented Apr 8, 2015 at 13:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .