Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Binary Variable help

  • 25-11-2009 12:27PM
    #1
    Posts: 6,176 ✭✭✭


    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: 6,176 ✭✭✭ [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