Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: create a list with x,y,z coordinates

  • To: mathgroup at smc.vnet.net
  • Subject: [mg81596] Re: [mg81554] create a list with x,y,z coordinates
  • From: "Thomas Dowling" <thomasgdowling at gmail.com>
  • Date: Sat, 29 Sep 2007 02:21:25 -0400 (EDT)
  • References: <200709270151.VAA02309@smc.vnet.net>

Hello,

zVals = {13, 8, 15, 9, 15, 8, 11, 2, 18, 8, 5, 10, 11, 10, 9, 14, 6,
  23, 6, 14, 16, 5, 10, 5, 18, 10, 11, 10, 15, 8, 6, 23, 6, 17, 6, 12,
   9, 17, 4, 8, 18, 4, 18, 9, 13, 9, 14, 6, 10, 6, 5, 13, 5, 10, 6,
  19, 8, 17, 9, 16, 15, 5, 13, 5, 11, 9, 16, 2, 21, 11, 4, 15, 7, 10,
  7, 16, 10, 14, 7, 18, 17, 8, 15, 11, 14, 5, 14, 4, 13, 6, 8, 16, 8,
  22, 8,

table = Flatten[Table[{i, j}, {i, 0.05, 1, 0.1}, {j, 0.05, 1, 0.1}],
   1];

These give x and y values in separate lists:

listx = Map[First, table];

listy = Map[Last, table];

This gives list of x, y, z values:


Transpose[{listx, listy, zVals}]

Perhaps not as 'neat' as other solutions, but 'Transpose' is a goodie when
dealing with lists of {x, y} data.


Tom Dowling



  • Prev by Date: Union[...options]
  • Next by Date: Options[] does not list every option
  • Previous by thread: Re: create a list with x,y,z coordinates
  • Next by thread: Re: create a list with x,y,z coordinates