I have 36 points I need to find the nearest 5 elements of each point and cluster it in a group. Then there is a total of 36 clusters will get. The points are in the 'core' and I need to find the nearest elements from the 'data'. How can I do that? Please help me.
clc;clear;data=xlsread('Pimaxl.xlsx');Si=size(data);asc=sort(data);num = numel(data);diff=unique(asc);core1=maxk(diff,12);core2=mink(diff,12);n = numel(diff(:));midpoint = ceil(n/2);core3 = diff(midpoint-5:midpoint+6);cor=[core1 core2];core=[cor core3];
Best Answer