adding the values in a matrix based on the corresponding unique values of another matrix
===

e=[40 19 18 20 30 34 65 97 155 160];
if minimum difference between two values(for e.g. 19 18,30 34 and 155 160) then merge the values..Similar values also...Whatever condition can be used to solve this..Kindly help to solve this..