Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

Re: Sorting of Data Lists



A cleaner and slightly faster approach than my first reply:

Min /@ Transpose[{a, b}]

Bob Hanlon

FORWARDED MESSAGE:

a = Table[Random[], {10}]

{0.686343, 0.510246, 0.674491, 0.518116, 0.535909, 0.170308, 0.572901,
0.169033, 0.375999, 0.104331}

b = Table[Random[], {10}]

{0.0372163, 0.162369, 0.315898, 0.444942, 0.13808, 0.675542, 0.479727,
0.710194, 0.216237, 0.692723}

Transpose[{a, b}] /. {x_, y_} -> Min[x, y]

{0.0372163, 0.162369, 0.315898, 0.444942, 0.13808, 0.170308, 0.479727,
0.169033, 0.216237, 0.104331}


Bob Hanlon



  • Prev by Date: [CFP] Int. SSCC98 Conf., 22-24 Sep. 1998, Durban, South Africa
  • Next by Date: Re: Sorting of Data Lists
  • Prev by thread: Re: Sorting of Data Lists
  • Next by thread: Re: Sorting of Data Lists