MathGroup Archive 1999

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

Search the Archive

Re: Behavior of Array[]

  • To: mathgroup at
  • Subject: [mg19507] Re: Behavior of Array[]
  • From: "David Bailey" <dave-bailey at>
  • Date: Sat, 28 Aug 1999 15:53:24 -0400
  • References: <7q20js$>
  • Sender: owner-wri-mathgroup at

Joseph C. Slater wrote in message <7q20js$q91 at>...
>I've been using Mathematica for many years and one thing still puzzles me.
>Elements of the array defined by the variable 'a' can be obtained using
>a[[i,j]]=expression. However, the command Array creates arrays comprised
>of elements named in the form 'a[i,j]'. Note the single brackets.
>Everything I see in the Mathematica book about brackets says that these
>are functions. This seems inconsistant to me. Shouldn't they be listed as
>'a[[i,j]]' until they are defined? What are the single brackets supposed
>to mean if not elements of the array 'a'?
>Thanks in advance,

The command Array[a, {3, 3}] should not be thought of as setting up the
array a, but using the function a[#1,#2]&
to set up the elements of an array - which you could then assign to
anything - say b.

If you try a construct such as

Array[Fibonacci, 8]

this relationship should become more obvious.

David Bailey
Salford Software

  • Prev by Date: Telecomms 3D Erlang Blocking Problem-Efficiency improvements please
  • Next by Date: ANN: Leibniz for Windows now available
  • Previous by thread: Re: Behavior of Array[]
  • Next by thread: Re: Behavior of Array[]