for i=1:1
clc
format long g
%均值聚類
opts = statset('Display','final');
[Idx,Ctrs,SumD,D] = kmeans(youjizhi,20,'Replicates',2000,'Options',opts, 'Start','uniform');
points=[Idx youjizhi];
%檢驗標準偏差分佈
'全部樣本的標準偏差'
wd=youjizhi';
std(wd,0,2)
'cluster樣本差'
cluster1=[];
cluster2=[];
cluster3=[];
cluster4=[];
cluster5=[];
cluster6=[];
cluster7=[];
cluster8=[];
cluster9=[];
cluster10=[];
cluster11=[];
cluster12=[];
cluster13=[];
cluster14=[];
cluster15=[];
cluster16=[];
cluster17=[];
cluster18=[];
cluster19=[];
cluster20=[];
[row col]=size(points);
for i=1:1:row
id=points(i,1);
value=points(i,:);
if id==1
cluster1=[cluster1;value];
end
if id==2
cluster2=[cluster2;value];
end
if id==3
cluster3=[cluster3;value];
end
if id==4
cluster4=[cluster4;value];
end
if id==5
cluster5=[cluster5;value];
end
if id==6
cluster6=[cluster6;value];
end
if id
結合matlab與arcpy的土壤樣點聚類與成圖
matlab 進行均值聚類與分類
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.