MathGroup Archive 1996

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

Search the Archive

Re: can an "array" start with an index other than 1?


steve at gandalf.radonc.washington.edu (Steve Sutlief)
T[mg4688] can an "array" start with an index other than 1?

I would like to have a multidimensional array with an index running 
from -5 to 5, for example.

Steve:

You might like to try using Table instead of Array.

Table[f[i,j],{i,-3,2},{j,-2,1}]//MatrixForm

f[-3, -2]   f[-3, -1]   f[-3, 0]    f[-3, 1]

f[-2, -2]   f[-2, -1]   f[-2, 0]    f[-2, 1]

f[-1, -2]   f[-1, -1]   f[-1, 0]    f[-1, 1]

f[0, -2]    f[0, -1]    f[0, 0]     f[0, 1]

f[1, -2]    f[1, -1]    f[1, 0]     f[1, 1]

f[2, -2]    f[2, -1]    f[2, 0]     f[2, 1]

Allan Hayes
hay at haystack.demon.co.uk

==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Comparison of Mathematica on Various Computers
  • Next by Date: Questions about labels
  • Previous by thread: can an "array" start with an index other than 1?
  • Next by thread: Re: can an "array" start with an index other than 1?