Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
i have to form eucledian distance based clusters inside first box in which green color nodes are present.............iff, the calculated distance would be less than the pre-defined distance(D) present code
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
plz help me i can't able to find clusters in first box on the basis of eucledian distance b/w the nodes present only in first box................help me with syntax as soon as possible.here distance would be calculated b/w each and every node only present in the first box.
2 comentarios
KSSV
el 7 de Sept. de 2016
I have checked your question a week ago....You have re written the code....there are three cells/ boxes and they have no points in that.
Respuestas (1)
KSSV
el 7 de Sept. de 2016
If you have the coordinates in a cell/ box stored in the matrix coor, you can calculate the Euclidean distance as below:
dist = cell(npoints,1) ;
for i = 1:npoints % loop for each points, npoints is total number of points
data = repmat(coor(i,:),[length(coor),1])-coor ;
dist{i} = sqrt(data(:,1).^2+data(:,2).^2);
end
0 comentarios
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!