|
[Date Index]
[Thread Index]
[Author Index]
Re: Sorting of Data Lists
Christopher J. Freitas wrote:
> 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.
Given a pair of such vectors, e.g.,
a = Table[Random[],{20}]
b = Table[Random[],{20}]
Try
Map[Min, Transpose[{a,b}]]
--Lou Talman
Prev by Date:
Re: Deleting subscripted functions with arguments.
Next by Date:
plot graph
Prev by thread:
Re: Sorting of Data Lists
Next by thread:
Re: Sorting of Data Lists
|