4

The code below produces the error

Missing delimiter (. inserted).

{\it \begin{equation}
        $E_{k} = 10\log_{10}\left{ \frac{\sum_{i=1}^{M_{k}}{{\left[W_{k}^{P} x(i)\right]}^{2}}}{M_{k}}\right} (dB), \hspace{5em} k = 1,2,....,N\hspace{7em}$
        \end{equation}}\\
  • 1
    The error indicates a unmatched \left..\right pair. – Andrew Swann Mar 23 '15 at 7:47
4

Let me reformat your code to better understand what's wrong.

{\it
 \begin{equation}
    $E_{k} = 10\log_{10}
    \left{
    \frac{\sum_{i=1}^{M_{k}}{{\left[W_{k}^{P} x(i)\right]}^{2}}}{M_{k}}
    \right} (dB), \hspace{5em} k = 1,2,....,N\hspace{7em}$
    \end{equation}}\\
  • There is no need to have a group around the equation.

  • The command \it does nothing useful and, besides, it has been deprecated for twenty years

  • You don't want $ inside \begin{equation}

  • \left{ is illegal; you want to have a growing brace and the command for printing an open brace is \{

  • You seem to have lost the count of braces, due to the fraction. You probably wanted

    \frac{\sum_{i=1}^{M_{k}} [W_{k}^{P} x(i)]^{2}}{M_{k}}
    

    (note that \left[ and \right] are not necessary, they're even bad!)

  • \right} is similar to the above.

  • ellipsis should be denoted by \dots

  • The final \hspace{7em} serves no purpose

So, here's a better realization

\begin{equation}
  E_{k}=10\log_{10}
  \left\{
    \frac{ \sum_{i=1}^{M_{k}} [W_{k}^{P} x(i)]^{2} }{ M_{k} }
  \right\}
  \,\mathrm{dB},
  \qquad k=1,2,\dots,N
\end{equation}

You probably also want to use siunitx for units, so \,\mathrm{dB} can better become \si{\decibel}, which is even much clearer, isn't it?

enter image description here

The fraction appears to be quite crowded, though; better set the denominator in front of the summation:

\documentclass{article}
\usepackage{amsmath}
\usepackage{siunitx}

\begin{document}

\begin{equation}
  E_{k}=10\log_{10}
  \biggl\{
    \frac{1}{M_{k}} \sum_{i=1}^{M_{k}} [W_{k}^{P} x(i)]^{2}
  \biggr\}
  \si{\decibel},
  \qquad k=1,2,\dots,N
\end{equation}

\end{document}

enter image description here

  • 2
    I know it's not your cup of tea, but I would prefer \bigl[...\bigr] especially given that the superscript P is so optically large. Also, there could be a thin space before the unit. – yo' Mar 23 '15 at 8:36
2

There are many issues with your code.

  1. Don't use \it: it has been replaced by \textit and \itshape. None of these commands affects maths mode.
  2. Don't use dollar signs in the maths environments: they automatically enter maths mode.
  3. Don't use manual line breaks after displayed maths: the spacing is handled automatically.
  4. Use the siunitx package to format physical units.
  5. Use \dots to print a correctly-spaced ellipsis.
  6. When printing braces, use \{ and \}.

Your code should be

\begin{equation}
  E_{k} = 10\log_{10}\left\{\frac{\sum_{i=1}^{M_{k}}{{\left[W_{k}^{P}x(i)\right]}^{2}}}{M_{k}}\right\} (\si{\decibel}), \hspace{5em} k = 1,2,\dots,N
\end{equation}
  • 3
    \dots instead of ....? But much more relevant: \left{ and \right} are still wrong. – egreg Mar 23 '15 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.