Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1996

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg4704] Re: [mg4688] can an "array" start with an index other than 1?
  • From: Allan Hayes <hay at haystack>
  • Date: Sat, 31 Aug 1996 03:57:26 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

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?