Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum > General > > "About counting elements"

Post Reply:
Name:
Email Address:

Please send email when my message is replied to.

Url (optional):
Subject:
Message: view original message?
Attachment (optional):
Please answer this:3+2 =



Original Message (ID '278338') By Bill Simpson:
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