data=[1739.94 1675.15 2395.96
373.3 3087.05 2429.47
1756.77 1652 1514.98
864.45 1647.31 2665.9
222.85 3059.54 2002.33
877.88 2031.66 3071.18
1803.58 1583.12 2163.05
2352.12 2557.04 1411.53
401.3 3259.94 2150.98
363.34 3477.95 2462.86
1571.17 1731.04 1735.33
104.8 3389.83 2421.83
499.85 3305.75 2196.22
2297.28 3340.14 535.62
2092.62 3177.21 584.32
1418.79 1775.89 2772.9
1845.59 1918.81 2226.49
2205.36 3243.74 1202.69
2949.16 3244.44 662.42
1692.62 1867.5 2108.97
1680.67 1575.78 1725.1
2802.88 3017.11 1984.98
172.78 3084.49 2328.65
2063.54 3199.76 1257.21
1449.58 1641.58 3405.12
1651.52 1713.28 1570.38
341.59 3076.62 2438.63
291.02 3095.68 2088.95
237.63 3077.78 2251.96
1702.8 1639.79 2068.74
1877.93 1860.96 1975.3
867.81 2334.68 2535.1
1831.49 1713.11 1604.68
460.69 3274.77 2172.99
2374.98 3346.98 975.31
2271.89 3482.97 946.7
1783.64 1597.99 2261.31
198.83 3250.45 2445.08
1494.63 2072.59 2550.51
1597.03 1921.52 2126.76
1598.93 1921.08 1623.33
1243.13 1814.07 3441.07
2336.31 2640.26 1599.63
354 3300.12 2373.61
2144.47 2501.62 591.51
426.31 3105.29 2057.8
1507.13 1556.89 1954.51
343.07 3271.72 2036.94
2201.94 3196.22 935.53
2232.43 3077.87 1298.87
1580.1 1752.07 2463.04
1962.4 1594.97 1835.95
1495.18 1957.44 3498.02
1125.17 1594.39 2937.73
24.22 3447.31 2145.01
1269.07 1910.72 2701.97
1802.07 1725.81 1966.35
1817.36 1927.4 2328.79
1860.45 1782.88 1875.13
];
[center,U,obj_fcn] = fcm(data,4);
plot3(data(:,1),data(:,2),data(:,3),'o');
grid;
maxU=max(U);
index1 = find(U(1,:) == maxU)
index2 = find(U(2,:) == maxU)
index3 = find(U(3,:) == maxU)
index4 = find(U(4,:) == maxU)
line(data(index1,1),data(index1,2),data(index1,3),'linestyle','none','marker','*','color','g');
line(data(index2,1),data(index2,2),data(index2,3),'linestyle','none','marker','*','color','r');
line(data(index3,1),data(index3,2),data(index3,3),'linestyle','none','marker','+','color','b');
line(data(index4,1),data(index4,2),data(index4,3),'linestyle','none','marker','+','color','y');
title('模糊C均值聚类分析图');
xlabel('第一特征坐标');
ylabel('第二特征坐标');
zlabel('第三特征坐标');