Union & Select for removing duplicates in a list
- To: mathgroup at smc.vnet.net
- Subject: [mg47933] Union & Select for removing duplicates in a list
- From: "Blimbaum, Jerry AA R22" <jerry.blimbaum at navy.mil>
- Date: Fri, 30 Apr 2004 19:27:29 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
- Thread-topic: Union & Select for removing duplicates in a list
I got list of numbers using FindRoot...which had duplicates...or, at least, what looked like duplicates....I used Union to sort and , according to documentation, remove duplicates....but it didnt work.....so list , after Union, looks like this for example.... {.0035, .0035, .005, .006...etc..} I was actually building up {x,y} pairs from several lists one entry of which came up as {.0035, .0035} for example.....I then applied Select ... Select[{x,y} pairs, #[[1]]NotEqual#[[2]]&]......and to my surprise this worked, it removed {.0035, .0035}.....I assume that 'duplicate' for Union and Select mean the same thing.....but then not according to the actual operations..... what am I missing? thanks....jerry blimbaum