MathGroup Archive 2013

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

Search the Archive

Re: Creating an ordered list of pairs

  • To: mathgroup at smc.vnet.net
  • Subject: [mg132091] Re: Creating an ordered list of pairs
  • From: Alexei Boulbitch <Alexei.Boulbitch at iee.lu>
  • Date: Tue, 3 Dec 2013 05:24:15 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net

How do I create an ordered list of pairs of the following structure:
{{x1,y1}, {x2,y2}, {x3,y3}, ...} ? I want x1, x2, and x3 to be increasing in constant-interval steps (e.g. 1,2,3) and similarly for the y's (e.g. 5,10,15). E.g.
{{1,5}, {1,10}, {1,15}, {2, 5}, {2,10}, ...} etc.

I cannot figure out how to do this with Table or Array. Is there another function that will do this?

Table does not create the correct nesting or structure.

Thanks!

-Tony


Hi, Tony,

This:

Table[{i,5*i},{i,1,5,1}]

{{1,5},{2,10},{3,15},{4,20},{5,25}}

is probably what you need. Otherwise you should explain what are you after in a more clear way.

I strongly recommend that you should have a look into the documentation. This pays off astonishingly quickly.
Go to Menu/Help/Table or Menu/Help/ContourPlot for your other question which I will
not answer separately, and you will find there the answers to the questions you ask us.

One more thing: when using Mathematica stop thinking the Pithon-way,
think Mathematica-way. They are different. But first start consulting the documentation.

Have fun. Alexei


Alexei BOULBITCH, Dr., habil.
IEE S.A.
ZAE Weiergewan,
11, rue Edmond Reuter,
L-5326 Contern, LUXEMBOURG

Office phone :  +352-2454-2566
Office fax:       +352-2454-3566
mobile phone:  +49 151 52 40 66 44

e-mail: alexei.boulbitch at iee.lu






  • Prev by Date: Re: Creating a list of 1x2 element arrays without procedural
  • Next by Date: Re: Data format AFTER import into Mathematica from Excel.xls worksheet
  • Previous by thread: Re: Creating an ordered list of pairs
  • Next by thread: Creating a list of 1x2 element arrays without procedural programming