More help on sorting out a large list
- To: mathgroup at smc.vnet.net
- Subject: [mg58372] More help on sorting out a large list
- From: tornado78 <tornado78 at hotmail.com>
- Date: Tue, 28 Jun 2005 21:57:04 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Ok here's a problem I've been trying to figure out for awhile. I have a large XYZ sorted matrix and what i need is to look at two columns x,y and and if it is a unique point keep the row, if there are multiple rows with same x,y pair i need to remove all of them and leave only the middle Z row or the average of the middle two Z rows for example x y z {1, 6, 4, 8, 4, 5, 8, 3} drop {1, 3, 5, 8, 4, 5, 3, 3}--take {5, 3, 6, 8, 4, 5, 6, 3} drop {4, 5, 3, 4, 5, 6, 1, 0}drop {2, 5, 4, 3, 5, 6, 9, 1}\ {1, 2, 5, 4, 5, 6, 7, 8} -take average {3, 5, 6, 3, 5, 6, 6, 4}drop {5, 3, 5, 2, 7, 8, 2, 5}----take thanks for any help