Re: ordered positions (OrderedPosition?)
- To: mathgroup at smc.vnet.net
- Subject: [mg83431] Re: ordered positions (OrderedPosition?)
- From: Ray Koopman <koopman at sfu.ca>
- Date: Tue, 20 Nov 2007 03:53:00 -0500 (EST)
- References: <fhrrsj$5gh$1@smc.vnet.net>
In[1]:= data = {{4, 3, 3, 5, 1, 2, 5, 2, 3, 2}, {1, 5, 4, 1, 3, 4, 1, 7, 3, 4}}; In[2]:= Position[data,_,{2},Heads->False][[Ordering@Flatten@data]] Out[2]={{1,5},{2,1},{2,4},{2,7},{1,6},{1,8},{1,10},{1,2},{1,3},{1,9}, {2,5},{2,9},{1,1},{2,3},{2,6},{2,10},{1,4},{1,7},{2,2},{2,8}}