Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: What is f[1]? Advanced question
Replies: 9   Last Post: Jul 1, 2013 5:45 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Louis Talman

Posts: 4,475
Registered: 12/27/05
Re: What is f[1]? Advanced question
Posted: Jun 28, 2013 3:49 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Tue, 25 Jun 2013 19:14:08 -0600, amannucci
<Anthony.J.Mannucci@jpl.nasa.gov> wrote:

> I have found a Mathematica program with the following construct:
> x[1]=0.1
> x[2]=0.2
> x[3]=0.3
> or
> Do[x[i]=i/10.,{i,1,3}]
> x is not a function. It is not a list. What is it? If I query x thus:
> ?x


x most certainly *is* a function. Its a function whose domain contains
just the three numbers 1, 2, and 3.

And it is *not* an array. Mathematica has lists, which it uses as arrays
on occasion. An array, y, is indexed with double brackets: a[[1]],
a[[2]], etc.

--Louis A. Talman
Department of Mathematical and Computer Sciences
Metropolitan State University of Denver

<http://rowdy.msudenver.edu/~talmanl>
.





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.