Info

この質問は閉じられています。 編集または回答するには再度開いてください。

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 回表示 (過去 30 日間)
kiranpreet kaur
kiranpreet kaur 2016 年 9 月 7 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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 件のコメント
KSSV
KSSV 2016 年 9 月 7 日
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.
kiranpreet kaur
kiranpreet kaur 2016 年 9 月 7 日
sir i does not have any mean with other 3 boxes. I only want to find clusters in 1st box on the basis of eucledian distance b/w the nodes present in that box only............plz help me sir i understands what ever u said earlier to me...........help me plz.......Although i gives predefined distance(D). if calculated eucledian distance b/w nodes present in 1st box is less than D it must included in cluster............plz help me as soon as possible

回答 (1 件)

KSSV
KSSV 2016 年 9 月 7 日
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

この質問は閉じられています。

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by