| Author |
Comment/Response |
Bill Simpson
|
01/24/13 10:59pm
In Response To 'Another question' --------- http://reference.wolfram.com/mathematica/ref/Piecewise.html
In[1]:= dist[x_]:=Piecewise[{{.1,x==2},{.1,x==-2},{.2,x==1},{.2,x==-1},{.4,x==0},{0,True}}]
In[2]:= dist[2]
Out[2]= 0.1
In[3]:= dist[-1]
Out[3]= 0.2
In[4]:= dist[3]
Out[4]= 0
URL: , |
|