Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*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 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