Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: How to find the idx of different relative Min values
Replies: 5   Last Post: Oct 7, 2012 9:33 PM

 Messages: [ Previous | Next ]
 Tanya Posts: 4 Registered: 10/7/12
How to find the idx of different relative Min values
Posted: Oct 7, 2012 11:14 AM

I have a matrix which looks like the following:

367 rows x 3 columns

Column 1 = Point ID (the ID of a point (the ID is a number between 18 and 7253)
Column 2 = Group (The Group the point ID is associated with (Groups = number between 25 - 841)
Column 3 = Distance ( The distance in pixels that the Point ID lies away from a specific vector (Distances = a number between 6 - 511)

I want to do the following: If the Group number occurs more than once, find the ID of the Point such that the distance is minimum.

I.e. if there are 3 points A B and C which all belong to Group 3 I am only interest in the Point with the smallest distance.

Date Subject Author
10/7/12 Tanya
10/7/12 Bruno Luong
10/7/12 Tanya
10/7/12 dpb
10/7/12 Matt J
10/7/12 Matt J