[Tex/LaTex] Moving part of equation to next line


I have an equation:

MMAV1 = \frac{1}{N} \sum_{n=1}^N \omega_n|x_n|, \\
\omega_n =
1 & if 0.25N \leq n \leq 0.75N \\
0.5 & otherwise \\

and I want the cases to be displayed on the next line.
I have tried using \begin{align} but that splits it into two equations with two reference numbers.

Does somebody know how to do this?

Best Answer

You can use aligned instead of align environment

\text{MMAV1} &= \frac{1}{N} \sum_{n=1}^N \omega_n|x_n|\,, \\
\omega_n &=
1 & \text{if $0.25N \leq n \leq 0.75N$} \\
0.5 & \text{otherwise}

Of course, you can ommit the \\ after \omega_n, if you do not want only the cases to be in a different line.

Also the split environment can do the trick (same use).

Both of the above need the amsmath package.