MathGroup Archive 2005

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

Search the Archive

Re: comparing two lists


Seems impossible to nest pure functions using only slots.
Here is the best I can do :

In[1]:=
myFunc=Function[{x},Flatten[Position[Last[x],_?(#1>First[x]&)],1]]/@Thread[{#1,#2}]&;


In[2]:=
vec={0.482259,0.314393};
mat={{0.183706,0.758693,0.462242,0.170041},{0.457054,0.349658,0.805455,
        0.127763}};

In[4]:=
myFunc[vec,mat]

Out[4]=
{{2},{1,2,3}}

v.a.


  • Prev by Date: Leading Zeros?
  • Next by Date: Re: Re: 2D-Plot Colorings
  • Previous by thread: Re: comparing two lists
  • Next by thread: Re: comparing two lists