Re: mathematica command to define discrete functions



On Tue, 26 Jul 2005 22:58:45 +0200, Scoobidoo wrote:
> I'm looking for a mathematica command to define a function only at specific
> points. For example
> f(-1,1)=1/9
> f(2,3)=45/123
> in other words to define the function f:{{-1,1},{2,3}}->{1/9,45/123} so that
> I can write for example f(-1,1)+f(2,3) and get the sum of 1/9 and 45/123

Function notation in Mathematica always uses brackets, never parentheses.

In[1]:= f[-1,1]=1/9

1
Out[1]= -
9

In[2]:= f[2,3]=45/123

15
Out[2]= --
41

In[3]:= f[-1,1]+f[2,3]

176
Out[3]= ---
369






--
Dave Seaman
Judge Yohn's mistakes revealed in Mumia Abu-Jamal ruling.
<http://www.commoncouragepress.com/index.cfm?action=book&bookid=228>
.



Relevant Pages

  • Re: Basic set question
    ... >> Dave Seaman ... >> Judge Yohn's mistakes revealed in Mumia Abu-Jamal ruling. ... > Calling a list a set does not make it one. ...
    (sci.math)
  • Re: Transcendental Dimensions
    ... Dave Seaman ... Judge Yohn's mistakes revealed in Mumia Abu-Jamal ruling. ... Prev by Date: ...
    (sci.math)
  • Re: 0^0
    ... Dave Seaman ... Judge Yohn's mistakes revealed in Mumia Abu-Jamal ruling. ... Prev by Date: ...
    (sci.math)
  • Re: Phenomena and noumena
    ... Dave Seaman ... Judge Yohn's mistakes revealed in Mumia Abu-Jamal ruling. ... Prev by Date: ...
    (sci.math)
  • Re: infinity
    ... Dave Seaman ... Judge Yohn's mistakes revealed in Mumia Abu-Jamal ruling. ... Prev by Date: ...
    (sci.math)