MATLAB: How to calculate Centriod from a sets of location coordinate value(x,y)

centriod from coordinatesMATLAB

Hi Dear, I have a sets of location coordinates (x,y). I want to calculate Centroid of this location coordinates and want to get a single coordinate of CENTROID. Please see the coordinates below and help me in this regards. Best Regards, Mir Abdul Kuddus. X = 189.549, 206.04471, 192.2392, 208.82796, 199.85 , 194.51 Y = 107.31534, 109.7032, 111.7894, 114.32674, 115.36, 116.36

Best Answer

xy_centroid = mean([X,Y])
or
>> T = readtable('your_xls_file.xls');
>> XY_centroid = mean(T{:,:})
XY_centroid =
196.4975 120.8612
>>