Piecewise function in Mathematica

http://reference.wolfram.com/language/ref/Piecewise.html.en

 

Use pw to enter  and  and then TemplateBox[{ctrl, return}, Key1, BaseStyle -> {ExampleText, FontWeight -> Plain, FontFamily -> Source Sans Pro}] for each additional piecewise case:

In[1]:=
Click for copyable input

\[Piecewise] {
{v1, d1},
{v2, d2},
{v3, d3}
} // InputForm
Out[1]//InputForm=
Advertisements