필터 지우기
필터 지우기

My question related to find the nearest point to the centroid of the each cluster?

조회 수: 6 (최근 30일)
rajesh kumar
rajesh kumar 2018년 5월 15일
댓글: Jan 2018년 5월 16일
after reducing the pareto set, the centroid of the clusters can be found, after finding the centroid of cluster i need to find nearest point to the centroid in each cluster. how to find nearest point to the centroid of each cluster. please suggest me with any related coding as an example.
  댓글 수: 8
Image Analyst
Image Analyst 2018년 5월 15일
Again, I gave you code. Scroll down the page and look at it. Comment down there if you have questions on it.
Jan
Jan 2018년 5월 16일
@rajesh kumar: You do not provide details, which allow to help you specifically. Please try to be much more clearer.

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2018년 5월 15일
For a given centroid, try this:
distances = sqrt((x - xCentroid).^2 + (y - yCentroid).^2);
[minDistance, indexOfMin] = min(distances);
xOfClosest = x(indexOfMin);
yOfClosest = y(indexOfMin);

카테고리

Help CenterFile Exchange에서 MATLAB Parallel Server에 대해 자세히 알아보기

제품


릴리스

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by