Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*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 2006

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

Search the Archive

RE: building a list containing elements f(i,j)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg71076] RE: [mg71045] building a list containing elements f(i,j)
  • From: "David Park" <djmp at earthlink.net>
  • Date: Wed, 8 Nov 2006 06:04:07 -0500 (EST)

Clear[f]
Array[f, {3, 5}, {0, 0}]

{{f[0, 0], f[0, 1], f[0, 2], f[0, 3], f[0, 4]}, {f[1, 0], f[1, 1], f[1, 2],
    f[1, 3], f[1, 4]}, {f[2, 0], f[2, 1], f[2, 2], f[2, 3], f[2, 4]}}

{3,5} gives the dimensions of the array - the number of rows and columns.
{0,0} gives the starting values for the indexing.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/



From: xarnaudx at gmail.com [mailto:xarnaudx at gmail.com]
To: mathgroup at smc.vnet.net

hi,
i want to construct a list of the form:
{ f[1,1], ... f[n,m] }
So the list contains elements of the form f[i,j] with i ranging from 0
to n, and j from 0 to somebound[i].

What would be the most elegant way to this?
thanks



  • Prev by Date: Re: Insertion into sorted list
  • Next by Date: Plotting multi-column data
  • Previous by thread: Re: building a list containing elements f(i,j)
  • Next by thread: RE: building a list containing elements f(i,j)