Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Binary Variable help

  • 25-11-2009 12:27PM
    #1
    Posts: 5,589 ✭✭✭


    I've asked Time Magazine for this before, but I lost the email with his response.

    I have a binary variable and I want to create an equation where I have

    \theta = { 0 and 1

    Where the 0 is on top of the 1 and the lbrace is large.


Comments

  • Registered Users, Registered Users 2 Posts: 8,452 ✭✭✭Time Magazine


    \begin{align*}
    % Put your LHS text before the "&" on the next line
    \theta & \left\{
    \begin{array}{cc}
    % Put top line of RHS betwen "&=" and "\\" on the next line
    &= 0 \\
    % Put bottom line of RHS after "&=" on the next line
    &= 1
    \end{array} \right.
    \end{align*}


  • Posts: 5,589 ✭✭✭ [Deleted User]


    You sir, are a King among men.

    Much more Kinglier then say Economiste Monetaire! (who didn't reply first!)


  • Registered Users, Registered Users 2 Posts: 271 ✭✭Clinker


    If you're using amsmath (which you'd need for align* anyway), you can use the "cases" environment for the RHS with the single large brace on the left.
    \documentclass[a4paper,oneside,12pt]{article}
    
    \usepackage{amsmath}
    
    \begin{document}
    
    \begin{equation*}
      \theta =
      \begin{cases}
        0 \\
        1
      \end{cases}
    \end{equation*}
    
    \end{document}
    


Advertisement