Effacer les filtres
Effacer les filtres

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

6 vues (au cours des 30 derniers jours)
rajesh kumar
rajesh kumar le 15 Mai 2018
Commenté : Jan le 16 Mai 2018
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 commentaires
Image Analyst
Image Analyst le 15 Mai 2018
Again, I gave you code. Scroll down the page and look at it. Comment down there if you have questions on it.
Jan
Jan le 16 Mai 2018
@rajesh kumar: You do not provide details, which allow to help you specifically. Please try to be much more clearer.

Connectez-vous pour commenter.

Réponses (1)

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

Catégories

En savoir plus sur MATLAB Parallel Server dans Help Center et File Exchange

Produits


Version

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by