MathGroup Archive 2005

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

Search the Archive

Re: # question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg60256] Re: [mg60233] # question
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Thu, 8 Sep 2005 06:37:21 -0400 (EDT)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

Use a helper function

sel[x_List, y_?NumericQ, op_Symbol]:=
    Select[x,op[#,y]&];

lst1={2,3,6,1,0};
lst2={2,5,3};

sel[lst1,#,Less]&/@lst2

{{1,0},{2,3,1,0},{2,1,0}}

(Complement[lst1,#]&/@%)==
  (sel[lst1,#,GreaterEqual]&/@lst2)

True


Bob Hanlon

> 
> From: "ekantian" <ekantian at yahoo.com>
To: mathgroup at smc.vnet.net
> Date: 2005/09/08 Thu AM 04:53:11 EDT
> Subject: [mg60256] [mg60233] # question
> 
> how do i manage overlapping #?
> 
> i.e.
> 
> Map[
>   Select[{2, 3, 6, 1, 0}, # < # &],
>   {2, 5, 3}]
> 
> 
> which i would like to return {{1,0},{2,3,1,0},{2,1,0}}
> 
> thx.
> 
> 


  • Prev by Date: Re: # question
  • Next by Date: Re: rootsearch in a piecewise function
  • Previous by thread: Re: # question
  • Next by thread: Notebook in LaTex