MathGroup Archive 2005

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

Search the Archive

Re: comparing two lists

  • To: mathgroup at smc.vnet.net
  • Subject: [mg54314] Re: comparing two lists
  • From: "Valeri Astanoff" <astanoff at yahoo.fr>
  • Date: Thu, 17 Feb 2005 10:30:36 -0500 (EST)
  • References: <cv086r$j2k$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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