# creating an array

• Aug 24th 2011, 05:22 PM
wik_chick88
creating an array
i want to create an array that looks as follows:
$\displaystyle T(x,0) = 0, 0<x<a\\T_{0}, a<x<b\\0, x>b$
with a curly bracket joining all 3 conditions on the left, however in the latex tutorial pdf the code given doesn't work! it says invalid function when i attempt it
• Aug 24th 2011, 05:41 PM
Ackbeet
Re: creating an array
Quote:

Originally Posted by wik_chick88
i want to create an array that looks as follows:
$\displaystyle T(x,0) = 0, 0<x<a\\T_{0}, a<x<b\\0, x>b$
with a curly bracket joining all 3 conditions on the left, however in the latex tutorial pdf the code given doesn't work! it says invalid function when i attempt it

Note that

produces

$\displaystyle T(x,0)=\begin{cases}0,&\quad 0<x<a\\ T_{0},&\quad a<x<b\\ 0,&\quad x>b\end{cases}.$
• Aug 25th 2011, 02:26 AM
CaptainBlack
Re: creating an array
Quote:

Originally Posted by wik_chick88
i want to create an array that looks as follows:
$\displaystyle T(x,0) = 0, 0<x<a\\T_{0}, a<x<b\\0, x>b$
with a curly bracket joining all 3 conditions on the left, however in the latex tutorial pdf the code given doesn't work! it says invalid function when i attempt it

Another way

[TEX]T(x,0)= \left\{\begin{array}{ll}0,&0<x<a\\T_0,&a<x<b\\0,& x>b \end{array} \right.[/TEX]

$\displaystyle T(x,0)= \left\{\begin{array}{ll}0,&0<x<a\\T_0,&a<x<b\\0,& x>b \end{array} \right.$