MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Array

  • To: mathgroup at smc.vnet.net
  • Subject: [mg69248] Re: Array
  • From: Roger Bagula <rlbagula at sbcglobal.net>
  • Date: Sun, 3 Sep 2006 23:46:37 -0400 (EDT)
  • References: <eddptn$3q3$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Bruce Colletti wrote:

>The command:
>
>   {A[1], A[2], A[3]} = {1, 2, 3}
>
>assigns a value to each A-variable.  However, the command:
>
>   Array[A,3] = {1,2,3}
>
>generates an error message.
>
>What is the difference between the two lines?
>
>Thankx.
>
>Bruce
>
>  
>
Whsat you have done is create an integer indexed function not an array:

A[n_Integer]=Table[n,{n,1,3}][[n]]

The array would be
a={1,2,3}
with elements
 a[[1]]=1
etc.


  • Prev by Date: Re: Dot Product in Cylindrical Coordinates
  • Next by Date: Re: Array
  • Previous by thread: Re: Array
  • Next by thread: Re: Array