0

enter image description here

Hello everyone, I want to write this equation in LaTeX, but I can't get the equation starting with H1 to the bottom line. I would be very happy if you could help with this.

    {{\mathcal{H}}_{0}}:y\left[ n \right]=w\left[ n \right]\ n=1,2,\ \ldots ,\ N
\\  {{\mathcal{H}}_{1}}:y\left[ n \right]=x\left[ n \right]+w\left[ n \right]\ n=1,2,\ \ldots ,\ N
4

You can use the split environment. I took the liberty to remove the unnecessary \left \right pairs, and simplified a bit your code:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}
\begin{split}
 \mathcal{H}_{0}:y[n] & =w[n],\quad n=1,2,\ \ldots ,\ N \\
 \mathcal{H}_{1}:y[ n] & =x[n]+w[n],\quad n=1,2,\ \ldots ,\ N
 \end{split}
\end{equation}

\end{document}

enter image description here

2
  • Thank you both very much.
    – Zang Li
    Sep 3 at 22:10
  • @ZangLi Thank you for your green check mark ...but with a lot of sincerity it is of Bernard. Please, can you switch it to Bernard? Thank you very much.
    – Sebastiano
    Sep 3 at 22:26
3

If you compile this:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
  \begin{aligned}
    {{\mathcal{H}}_{0}}&:y\left[ n \right]=w\left[ n \right]\ n=1,2,\ \ldots ,\ N\\
    {{\mathcal{H}}_{1}}&:y\left[ n \right]=x\left[ n \right]+w\left[ n \right]\ n=1,2,\ \ldots ,\ N
  \end{aligned}
\end{equation}
\end{document}

then you get this:

enter image description here

1
  • 1
    Thank you very much.
    – Zang Li
    Sep 3 at 22:10
1

Another possibility it is to use array enviroment. I have build this MWE looking your image and I have used the same fonts.

\documentclass[a4paper,12pt]{article}
\usepackage{newtxtext,newtxmath}
\usepackage{amsmath} 
\DeclareMathAlphabet{\pazocal}{OMS}{zplm}{m}{n}
\begin{document}
\begin{equation}
 \begin{array}{ll}
 \pazocal{H}_{0}\colon y[n]&=w[n],\quad n=1,2,\ldots, N \\
 \pazocal{H}_{1}\colon y[n]&=x[n]+w[n],\quad n=1,2,\ldots, N
  \end{array}
\end{equation}

\end{document}

enter image description here

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.