Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #16313

Re: Creating an ordered list of pairs

From Alexei Boulbitch <Alexei.Boulbitch@iee.lu>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Creating an ordered list of pairs
Date 2013-12-03 10:20 +0000
Message-ID <l7kba7$45b$1@smc.vnet.net> (permalink)
Organization Time-Warner Telecom

Show all headers | View raw


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@iee.lu



Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Creating an ordered list of pairs Alexei Boulbitch <Alexei.Boulbitch@iee.lu> - 2013-12-03 10:20 +0000

csiph-web