How can I find the center of random coordinates?

7 Ansichten (letzte 30 Tage)
aksa
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?

Akzeptierte Antwort

Image Analyst
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
aksa
aksa am 2 Dez. 2017
Dear Sir Thanks very much My problem is that if I have 100 sensor node distributed randomly and I know the contented of them and there are limit radius such as 25M (no sensor placed out side of 25M) should I use the above method or there are any way else
Thanks
Image Analyst
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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Star Strider
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.
  1 Kommentar
aksa
aksa am 2 Dez. 2017
Dear Sir Thank you very much for your answer Is there any algorithm in MATLAB can be use for large scale to find the center Thanks

Melden Sie sich an, um zu kommentieren.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by