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: Position function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg55562] Re: Position function
  • From: bghiggins at ucdavis.edu
  • Date: Wed, 30 Mar 2005 03:20:56 -0500 (EST)
  • References: <d2b4q9$77c$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Try this:

In[6]:=Map[Flatten[Position[#,1]]&,a]

Out[6]={{1,3,5},{3,4,6}}

and for your second question

ls= {{1, 1}, {1, 3}, {1, 5}, {2, 3}, {2, 4}, {2, 6}} ;

In[2]:= ls/.{x_,y_}->y

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

Cheers 

Brian


  • Prev by Date: Re: front end complaint (ui design flaw?)
  • Next by Date: Re: how to make conditional summation
  • Previous by thread: Re: Position function
  • Next by thread: Re: Position function