MathGroup Archive 2014

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

Search the Archive

Re: Simple list question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg132592] Re: Simple list question
  • From: "Dr. Wolfgang Hintze" <weh at snafu.de>
  • Date: Mon, 14 Apr 2014 23:01:39 -0400 (EDT)
  • 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
  • References: <lig9nr$cft$1@smc.vnet.net>

Use Join instead of Append:

Join[coin, coex]
{6.64424, 7.1156}, {7.50084, 9.96003}, {2.54776, 2.72347}, {1.69042, 
  2.56066}, {0.782634, 1.55627}}

Best regards,
Wolfgang



"Ste[hen Gray"  schrieb im Newsbeitrag news:lig9nr$cft$1 at smc.vnet.net... 

pcin = 2;
pcex = 3;   (*pcin and pcex can have various small values *)

coin = Table[{10 RandomReal[], 10 RandomReal[]}, {pcin}]
coex = Table[{3 RandomReal[], 3 RandomReal[]}, {pcex}]
cobo = Append[coin, coex]


gives, typically,

{{0.288346, 3.57763}, {1.7335, 8.69666}}
{{0.179831, 1.35324}, {0.927483, 0.931586}, {1.76338, 2.45073}}
{{0.288346, 3.57763}, {1.7335,
   8.69666}, {{0.179831, 1.35324}, {0.927483, 0.931586}, {1.76338,
    2.45073}}}

What I want is a series of x,y coordinates with no extra nesting:

{{0.288346, 3.57763}, {1.7335,
   8.69666}, {0.179831, 1.35324}, {0.927483, 0.931586}, {1.76338,
    2.45073}}

I'm embarrassed to admit that I can't find how to do this.

Please email me. Thank you.

stevebg at roadrunner.com





  • Prev by Date: Re: Simple list question
  • Next by Date: Re: Simple list question
  • Previous by thread: Re: Simple list question
  • Next by thread: Re: Simple list question