For Routine to Map Routine
- To: mathgroup at smc.vnet.net
- Subject: [mg70400] For Routine to Map Routine
- From: Benedetto Bongiorno <bbongiorno at attglobal.net>
- Date: Sun, 15 Oct 2006 00:19:53 -0400 (EDT)
To All, Dimensions of ans01 is 2185850 by 5. I am looking to convert my For routine to the more efficient Map routine n=Length[ans01] fo={}; For[i=1, i<n, i++, If[ans01[[i,1]] == ans01[[i+1,1]], AppendTo[fo, ans01[[1]]]]; I tried Map[If[#[[1]] == #[[1]],#]&,ans01]; But it does not work. Thank you Ben