Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #16316
| From | Francisco Gutierrez <fgutiers2002@yahoo.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Creating a list of 1x2 element arrays without procedural |
| Date | 2013-12-05 07:59 +0000 |
| Message-ID | <l7pbof$gbi$1@smc.vnet.net> (permalink) |
| References | <20131203102355.DA0FA6A02@smc.vnet.net> |
| Organization | Time-Warner Telecom |
What about this Tony:
Flatten[Outer[List,Range[30,45,5],Range[-270,-240,10]],1]
On Tuesday, December 3, 2013 5:29 AM, Alexei Boulbitch <Alexei.Boulbitch@iee.lu> wrote:
Is there a way in Mathematica using built-in functions to create what the following procedural program does?
latlong = {}
Do[AppendTo[latlong, {i, j}] , {i, 30.0, 45.0,
5.0}, {j, -270.0, -240.0, 10.0}];
latlong
Out:
{{30., -270.}, {30., -260.}, {30., -250.}, {30., -240.}, {35., \
-270.}, {35., -260.}, {35., -250.}, {35., -240.}, {40., -270.}, {40., \
-260.}, {40., -250.}, {40., -240.}, {45., -270.}, {45., -260.}, {45., \
-250.}, {45., -240.}}
Thanks!
-Tony
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Creating a list of 1x2 element arrays without procedural Francisco Gutierrez <fgutiers2002@yahoo.com> - 2013-12-05 07:59 +0000
csiph-web