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 ]
Tomas Garza Hernandez

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

It is possibly a previously declared "Array" with the name "x", and the three lines are assigning values to the elements of the array. Check for Array in the Help.

> From: Anthony.J.Mannucci@jpl.nasa.gov
> Subject: What is f[1]? Advanced question
> To: mathgroup@smc.vnet.net
> Date: Tue, 25 Jun 2013 21:14:08 -0400
> 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
> the answer is just what I have written above. Mathematica knows about x[1], x[2], etc. How does Mathematica know about the "elements" of x?
> In some other sense, I could have written:
> y1 = 0.1
> y2 = 0.2
> y3 = 0.3
> But
> ?y
> obviously gives a different result (just returns y).
> Thank you.

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

[Privacy Policy] [Terms of Use]

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