MathGroup Archive 2005

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

Search the Archive

Re: Position function


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