Community Tip - You can change your system assigned username to something more personal in your community settings. X
I have a matrix with two columns. The first column is sorted and there are repeating elements in the first column with the corresponding elements in the second column.
I want to keep the element from the first column that have lowest value in the second column, the rest should be deleted. So there should be no repeating elements in the first
column and the element that is kept has lowest number in the second column.( compared to its repeated elements ).
Anyone who has an alghoritm for that or ideas ?
Solved! Go to Solution.
aagic wrote:
I have a matrix with two columns. The first column is sorted and there are repeating elements in the first column with the corresponding elements in the second column.I want to keep the element from the first column that have lowest value in the second column, the rest should be deleted. So there should be no repeating elements in the first
column and the element that is kept has lowest number in the second column.( compared to its repeated elements ).
Anyone who has an alghoritm for that or ideas ?
Do you mean something like the attached?
(caveat: I haven't checked it, I've just sneaked it together whilst waiting for my PC to do something else work-related ...)
Stuart
aagic wrote:
I have a matrix with two columns. The first column is sorted and there are repeating elements in the first column with the corresponding elements in the second column.I want to keep the element from the first column that have lowest value in the second column, the rest should be deleted. So there should be no repeating elements in the first
column and the element that is kept has lowest number in the second column.( compared to its repeated elements ).
Anyone who has an alghoritm for that or ideas ?
Do you mean something like the attached?
(caveat: I haven't checked it, I've just sneaked it together whilst waiting for my PC to do something else work-related ...)
Stuart
Hi Stuart,
it seams to be correct. Excellent, thanks !!
Adnan