[Date Index]
[Thread Index]
[Author Index]
Re: What is f[1]? Advanced question
*To*: mathgroup at smc.vnet.net
*Subject*: [mg131367] Re: What is f[1]? Advanced question
*From*: Helen Read <readhpr at gmail.com>
*Date*: Mon, 1 Jul 2013 05:51:38 -0400 (EDT)
*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com
*Delivered-to*: l-mathgroup@wolfram.com
*Delivered-to*: mathgroup-outx@smc.vnet.net
*Delivered-to*: mathgroup-newsendx@smc.vnet.net
*References*: <kqm704$hpb$1@smc.vnet.net>
x is not an array. It is a symbol which in this case has not been
defined. It does not refer to the list.
If you were to name the array, like this:
b= Array[x, 3]
The list is named b, and you can extract the entries with double brackets.
b[[2]]
Perhaps your confusion arises from the fact that b[[2]] and x[2] are
equal. Here is another example that will perhaps clarify.
c = Array[x, 5, -8]
c[[1]] (* first entry of c. Not the same as x[1] *)
c[[2]] (* second entry of c. Not the same as x[2] *)
On 6/29/2013 4:48 AM, Tomas Garza wrote:
> In[2]:= Array[x, 3]
>
> Out[2]= {x[1], x[2], x[3]}
>
> x is an array and is indexed with single brackets (cf. the Help browser).
> -Tomas
>
>> From: talmanl at gmail.com
>> Subject: Re: What is f[1]? Advanced question
>> To: mathgroup at smc.vnet.net
>> Date: Fri, 28 Jun 2013 04:15:13 -0400
>>
>> On Tue, 25 Jun 2013 19:14:08 -0600, amannucci
>> <Anthony.J.Mannucci at 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>
>
>
Prev by Date:
**Re: Grids**
Next by Date:
**Re: Russian Peasant Multiplication / was question on**
Previous by thread:
**Re: Syzygy module computation**
Next by thread:
**Re: Russian Peasant Multiplication / was question on**
| |