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



How about the following:

a1={1,3,8};
a2={2,4,7};

Map[Min[#]&,Transpose[{a1,a2}]]

John C. Erb

-----Original Message-----
From: CFreitas@swri.edu <CFreitas@swri.edu> To: mathgroup@smc.vnet.net
Subject: [mg11047] [mg11011] Sorting of Data Lists


>I have two equal length vector sets of data.  I wish to form a third
>vector  whose elements are the minimum values from each component of
>the other two  vectors; i.e., if a(i) < b(i), then c(i) = a(i), else
>c(i) = b(i).  I have  tried many different methods within Mathematica
>3.0 and have not been  successful.  I would appreciate any suggestions
>as to how to accomplish this  task.
>Thank you.
>
>Dr. Christopher J. Freitas
>Principal Engineer - Computational Mechanics Southwest Research
>Institute
>Voice: 210-522-2137, Fax: 210-522-3042
>




  • Prev by Date: Re: sort and find in MATHEMATICA like in MATLAB
  • Next by Date: Re: Active Plots
  • Prev by thread: Re: Sorting of Data Lists
  • Next by thread: Re: Sorting of Data Lists