已知散点图中各点的坐标,如何确定散点图的中心点坐标? Matlab中该如何编程实现这一目标
已知散点图中各点的坐标,如何确定散点图的中心点坐标?Matlab中该如何编程实现这一目标例散点图中各点坐标为:X坐标:【-27.75813-27.86538-27.896...
已知散点图中各点的坐标,如何确定散点图的中心点坐标? Matlab中该如何编程实现这一目标
例 散点图中各点坐标为:
X坐标:
【-27.75813 -27.86538 -27.89614 -26.29042 -26.26301 -25.69922 -25.29691 -25.74611 -27.25799 -29.11894 -30.96857 -32.74566 -34.37809 -36.00479 -38.02763 -40.59597 -42.63756 -45.01431 -47.87414 -50.72623 -53.83505 -57.88968 -62.17971 -66.726 -71.71878 -76.80894 -82.1706 -87.81311 -93.76893 -99.8255 -106.0197 -112.139 -118.0806 -123.947 -129.7024 -135.1508 -140.2873 -145.0652 -149.3653 -153.3744 -157.0581 -160.2992 -163.1253 -165.505 -167.5282 -169.2568 -170.8562 -172.3879 -173.8028 -174.8035 -176.0078 -177.1631 -177.9789 -178.5086 -178.6219 -178.4492 -178.6735 -178.9566 -178.6963 -178.7353 -178.4504 -178.2129 -179.2777 -180.932 -181.653 -181.8374 -181.7969 -181.0939 -180.1995 -179.2878 -177.8998 -176.7905 -175.6076 -174.1216 -172.7312 -171.563 -170.4621 -168.6419 -166.4259 -163.9022 -160.6427 -156.678 -152.0748 -147.0169 -141.6802 -136.0387 -130.1534 -124.3706 -118.0774 -111.9634 -106.0197 100.1733 -94.39606 -88.90091 -83.67393 -78.67245 -74.05303 -69.63701 -65.63384 -62.30385 -59.08121 -56.181 -53.67058 -51.33656 -49.06119 -46.78585 -43.90418 -41.36111 -39.61802 -37.3906 -34.29942 -32.7378 -31.24947 -30.24165 -29.15966 -29.17654 -28.14407 -27.47564 -27.34533 -26.86675】
Y坐标:
【-11.43093 -7.33504 -3.219819 1.19694 5.521867 10.09087 14.79748 19.3832 23.63602 27.75194 31.89984 36.15376 40.61971 45.26599 49.78937 53.99276 58.96204 63.9044 68.59952 73.71349 78.95548 83.02946 87.03522 90.93258 94.13634 97.58494 100.7701 103.5208 105.127 106.7607 106.7691 105.3319 103.3216 101.7582 99.9876 97.28773 94.03392 90.28625 85.9249 81.5079 76.97027 72.15226 67.16818 62.02729 56.88123 51.80617 46.94813 42.31302 37.81642 33.23785 28.97676 24.81845 20.6074 16.39496 12.15893 7.976506 4.012102 0.1211495 -3.792312 -7.62008 -11.43094 -15.21442 -19.13068 -23.2959 -27.50731 -31.74624 -36.05245 -40.24924 -44.45795 -48.76292 -52.93095 -57.3901 -61.98951 -66.57877 -71.49828 -76.9743 -83.0015 -88.76293 -94.573 -100.5623 -106.0409 -110.8536 -114.8724 -118.2325 -121.1829 -123.4635 -124.9713 -127.2944 -126.1529 -124.8445 -123.6155 -122.9855 -122.0218 -119.5144 -116.5592 -113.4921 -109.8141 -106.2109 -102.139 -97.22799 -92.73074 -88.17573 -83.48322 -78.95894 -74.6897 -70.6647 -67.35995 -63.79037 59.67451 -55.99916 -52.8386 -48.76991 -44.72075 -40.51936 -36.40426 -32.02097 -27.98391 -23.87107 -19.69991 -15.57916 】
请高手指点。
对于这种不规则图形的重心是不是通过mean求得的坐标?
mean坐标和median坐标有和区别,分别代表什么意思呢?
拜求... 展开
例 散点图中各点坐标为:
X坐标:
【-27.75813 -27.86538 -27.89614 -26.29042 -26.26301 -25.69922 -25.29691 -25.74611 -27.25799 -29.11894 -30.96857 -32.74566 -34.37809 -36.00479 -38.02763 -40.59597 -42.63756 -45.01431 -47.87414 -50.72623 -53.83505 -57.88968 -62.17971 -66.726 -71.71878 -76.80894 -82.1706 -87.81311 -93.76893 -99.8255 -106.0197 -112.139 -118.0806 -123.947 -129.7024 -135.1508 -140.2873 -145.0652 -149.3653 -153.3744 -157.0581 -160.2992 -163.1253 -165.505 -167.5282 -169.2568 -170.8562 -172.3879 -173.8028 -174.8035 -176.0078 -177.1631 -177.9789 -178.5086 -178.6219 -178.4492 -178.6735 -178.9566 -178.6963 -178.7353 -178.4504 -178.2129 -179.2777 -180.932 -181.653 -181.8374 -181.7969 -181.0939 -180.1995 -179.2878 -177.8998 -176.7905 -175.6076 -174.1216 -172.7312 -171.563 -170.4621 -168.6419 -166.4259 -163.9022 -160.6427 -156.678 -152.0748 -147.0169 -141.6802 -136.0387 -130.1534 -124.3706 -118.0774 -111.9634 -106.0197 100.1733 -94.39606 -88.90091 -83.67393 -78.67245 -74.05303 -69.63701 -65.63384 -62.30385 -59.08121 -56.181 -53.67058 -51.33656 -49.06119 -46.78585 -43.90418 -41.36111 -39.61802 -37.3906 -34.29942 -32.7378 -31.24947 -30.24165 -29.15966 -29.17654 -28.14407 -27.47564 -27.34533 -26.86675】
Y坐标:
【-11.43093 -7.33504 -3.219819 1.19694 5.521867 10.09087 14.79748 19.3832 23.63602 27.75194 31.89984 36.15376 40.61971 45.26599 49.78937 53.99276 58.96204 63.9044 68.59952 73.71349 78.95548 83.02946 87.03522 90.93258 94.13634 97.58494 100.7701 103.5208 105.127 106.7607 106.7691 105.3319 103.3216 101.7582 99.9876 97.28773 94.03392 90.28625 85.9249 81.5079 76.97027 72.15226 67.16818 62.02729 56.88123 51.80617 46.94813 42.31302 37.81642 33.23785 28.97676 24.81845 20.6074 16.39496 12.15893 7.976506 4.012102 0.1211495 -3.792312 -7.62008 -11.43094 -15.21442 -19.13068 -23.2959 -27.50731 -31.74624 -36.05245 -40.24924 -44.45795 -48.76292 -52.93095 -57.3901 -61.98951 -66.57877 -71.49828 -76.9743 -83.0015 -88.76293 -94.573 -100.5623 -106.0409 -110.8536 -114.8724 -118.2325 -121.1829 -123.4635 -124.9713 -127.2944 -126.1529 -124.8445 -123.6155 -122.9855 -122.0218 -119.5144 -116.5592 -113.4921 -109.8141 -106.2109 -102.139 -97.22799 -92.73074 -88.17573 -83.48322 -78.95894 -74.6897 -70.6647 -67.35995 -63.79037 59.67451 -55.99916 -52.8386 -48.76991 -44.72075 -40.51936 -36.40426 -32.02097 -27.98391 -23.87107 -19.69991 -15.57916 】
请高手指点。
对于这种不规则图形的重心是不是通过mean求得的坐标?
mean坐标和median坐标有和区别,分别代表什么意思呢?
拜求... 展开
展开全部
x=[-27.75813 -27.86538 -27.89614 -26.29042 -26.26301 -25.69922 -25.29691 -25.74611 -27.25799 -29.11894 -30.96857 -32.74566 -34.37809 -36.00479 -38.02763 -40.59597 -42.63756 -45.01431 -47.87414 -50.72623 -53.83505 -57.88968 -62.17971 -66.726 -71.71878 -76.80894 -82.1706 -87.81311 -93.76893 -99.8255 -106.0197 -112.139 -118.0806 -123.947 -129.7024 -135.1508 -140.2873 -145.0652 -149.3653 -153.3744 -157.0581 -160.2992 -163.1253 -165.505 -167.5282 -169.2568 -170.8562 -172.3879 -173.8028 -174.8035 -176.0078 -177.1631 -177.9789 -178.5086 -178.6219 -178.4492 -178.6735 -178.9566 -178.6963 -178.7353 -178.4504 -178.2129 -179.2777 -180.932 -181.653 -181.8374 -181.7969 -181.0939 -180.1995 -179.2878 -177.8998 -176.7905 -175.6076 -174.1216 -172.7312 -171.563 -170.4621 -168.6419 -166.4259 -163.9022 -160.6427 -156.678 -152.0748 -147.0169 -141.6802 -136.0387 -130.1534 -124.3706 -118.0774 -111.9634 -106.0197 100.1733 -94.39606 -88.90091 -83.67393 -78.67245 -74.05303 -69.63701 -65.63384 -62.30385 -59.08121 -56.181 -53.67058 -51.33656 -49.06119 -46.78585 -43.90418 -41.36111 -39.61802 -37.3906 -34.29942 -32.7378 -31.24947 -30.24165 -29.15966 -29.17654 -28.14407 -27.47564 -27.34533 -26.86675];
y=[-11.43093 -7.33504 -3.219819 1.19694 5.521867 10.09087 14.79748 19.3832 23.63602 27.75194 31.89984 36.15376 40.61971 45.26599 49.78937 53.99276 58.96204 63.9044 68.59952 73.71349 78.95548 83.02946 87.03522 90.93258 94.13634 97.58494 100.7701 103.5208 105.127 106.7607 106.7691 105.3319 103.3216 101.7582 99.9876 97.28773 94.03392 90.28625 85.9249 81.5079 76.97027 72.15226 67.16818 62.02729 56.88123 51.80617 46.94813 42.31302 37.81642 33.23785 28.97676 24.81845 20.6074 16.39496 12.15893 7.976506 4.012102 0.1211495 -3.792312 -7.62008 -11.43094 -15.21442 -19.13068 -23.2959 -27.50731 -31.74624 -36.05245 -40.24924 -44.45795 -48.76292 -52.93095 -57.3901 -61.98951 -66.57877 -71.49828 -76.9743 -83.0015 -88.76293 -94.573 -100.5623 -106.0409 -110.8536 -114.8724 -118.2325 -121.1829 -123.4635 -124.9713 -127.2944 -126.1529 -124.8445 -123.6155 -122.9855 -122.0218 -119.5144 -116.5592 -113.4921 -109.8141 -106.2109 -102.139 -97.22799 -92.73074 -88.17573 -83.48322 -78.95894 -74.6897 -70.6647 -67.35995 -63.79037 59.67451 -55.99916 -52.8386 -48.76991 -44.72075 -40.51936 -36.40426 -32.02097 -27.98391 -23.87107 -19.69991 -15.57916];
plot(x,y,'.')
hold on
xmean=mean(x);
ymean=mean(y);
plot(xmean,ymean,'*')
mean求得平均值,是矩阵或数组各元素加总后除以总的个数。median是求中央数,即将数组中元素按从小到大顺序排列后,取最中间的那个元素。
对于求重心问题,应该是平均值,所以用mean。
y=[-11.43093 -7.33504 -3.219819 1.19694 5.521867 10.09087 14.79748 19.3832 23.63602 27.75194 31.89984 36.15376 40.61971 45.26599 49.78937 53.99276 58.96204 63.9044 68.59952 73.71349 78.95548 83.02946 87.03522 90.93258 94.13634 97.58494 100.7701 103.5208 105.127 106.7607 106.7691 105.3319 103.3216 101.7582 99.9876 97.28773 94.03392 90.28625 85.9249 81.5079 76.97027 72.15226 67.16818 62.02729 56.88123 51.80617 46.94813 42.31302 37.81642 33.23785 28.97676 24.81845 20.6074 16.39496 12.15893 7.976506 4.012102 0.1211495 -3.792312 -7.62008 -11.43094 -15.21442 -19.13068 -23.2959 -27.50731 -31.74624 -36.05245 -40.24924 -44.45795 -48.76292 -52.93095 -57.3901 -61.98951 -66.57877 -71.49828 -76.9743 -83.0015 -88.76293 -94.573 -100.5623 -106.0409 -110.8536 -114.8724 -118.2325 -121.1829 -123.4635 -124.9713 -127.2944 -126.1529 -124.8445 -123.6155 -122.9855 -122.0218 -119.5144 -116.5592 -113.4921 -109.8141 -106.2109 -102.139 -97.22799 -92.73074 -88.17573 -83.48322 -78.95894 -74.6897 -70.6647 -67.35995 -63.79037 59.67451 -55.99916 -52.8386 -48.76991 -44.72075 -40.51936 -36.40426 -32.02097 -27.98391 -23.87107 -19.69991 -15.57916];
plot(x,y,'.')
hold on
xmean=mean(x);
ymean=mean(y);
plot(xmean,ymean,'*')
mean求得平均值,是矩阵或数组各元素加总后除以总的个数。median是求中央数,即将数组中元素按从小到大顺序排列后,取最中间的那个元素。
对于求重心问题,应该是平均值,所以用mean。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询