[問題] 計算fcm分群的各群平均值已回收
有一個 1050*800 的 [0,1] 矩陣,
將其轉換後以 matlab 內建的 fcm分群,
a=(rand(1050,800)<=0.6);
[i j]=find(z);[j i];
data=ans;
[center,U,obj_fcn] = fcm(data, 4);
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),'linestyle','none',...
'marker','*','color','g');
line(data(index2,1),data(index2, 2),'linestyle','none',...
'marker','*','color','r');
line(data(index3,1),data(index3, 2),'linestyle','none',...
'marker','*','color','b');
line(data(index4,1),data(index4, 2),'linestyle','none',...
'marker','*','color','k');
之後畫出來的圖長這樣:
http://ppt.cc/NEoy
我目前只知道一個區域中有幾個點,
請問有沒有辦法能"大概"測出區域的面積, 因為我想計算各區的平均值.
謝謝大家.
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.114.53.222