How can I find the center of random coordinates?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
aksa
am 2 Dez. 2017
Kommentiert: Image Analyst
am 2 Dez. 2017
If I have 100 points distributed randomly, how can I find the center of them?
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 2 Dez. 2017
Depends on what you mean by center. It could be the mean:
meanx = mean(x);
meany = mean(y); % Regardless of how big x and y are
OR could be the center between the min and max (average between left most and right most values).
middlex = (min(x) + max(x))/2;
middley = (min(y) + max(y))/2;
2 Kommentare
Image Analyst
am 2 Dez. 2017
Why would neither of the two methods I gave work and you'd want a different one? What is your definition of "center"? Please define EXACTLY what center means to you.
Weitere Antworten (1)
Star Strider
am 2 Dez. 2017
It depends on what you mean by ‘center’, The centroid of your point cloud is simply the mean of them in every dimension.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!