Effacer les filtres
Effacer les filtres

How to find centroid based on clusterdata?

4 vues (au cours des 30 derniers jours)
Izuru
Izuru le 15 Avr 2015
Réponse apportée : pfb le 15 Avr 2015
Hi,
I have an array that contains cluster coordinates. X-coordinates are in an array called:
xArray = [50x1 single] [20x1 single] (2 clusters) and
yArray = [50x1 single] [20x1 single] (corresponding y coordinates)
I would like to find a centroid point based on these cluster points, so I for cluster 1 I have
(x,y) centroid and so on for cluster 2.

Réponse acceptée

pfb
pfb le 15 Avr 2015
I guess your variables are cells... Your syntax is not very clear to me.
Anyway it should be
c1 = [ mean(xArray{1}) mean(yArray{1})]
c2 = [ mean(xArray{2}) mean(yArray{2})]
right?

Plus de réponses (0)

Catégories

En savoir plus sur Genomics and Next Generation Sequencing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by