Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Creating a list of 1x2 element arrays without
Replies: 4   Last Post: Dec 2, 2013 1:52 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Sseziwa Mukasa

Posts: 106
Registered: 8/26/07
Re: Creating a list of 1x2 element arrays without
Posted: Dec 2, 2013 1:43 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


latlong=Flatten[Table[{i,j},{i,30,45,5},{j,-270,-240,10}],1]

On Sunday, December 1, 2013, amannucci 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
>
>




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.