|
[Date Index]
[Thread Index]
[Author Index]
Re: Sorting of Data Lists
Christopher 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.
Christopher,
Suppose your two equal-length vectors are a and b.
In[1]:= c = Transpose[{a,b}];
In[2]:= c/.{x_,y_} -> Min [{x,y}]
does the trick.
Tomas Garza
Mexico City
Prev by Date:
greek letters in .ps plots
Next by Date:
Re: list combinations
Prev by thread:
Re: Sorting of Data Lists
Next by thread:
Re: Sorting of Data Lists
|