结合matlab与arcpy的土壤样点聚类与成图

本文介绍了如何利用Matlab和ArcPy进行土壤样点的聚类分析,并通过分层抽样原则选择点位,最终实现地图的绘制。通过对数据的深入处理,实现了高效的地图生成效果。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

matlab 进行均值聚类与分类
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==7
        cluster7=[cluster7;value];
    end
    if id==8
        cluster8=[cluster8;value];
    end
     if id==9
        cluster9=[cluster9;value];
     end
    if id==10
        cluster10=[cluster10;value];
    end
     if id==11
        cluster11=[cluster11;value];
     end
     if id==12
        cluster12=[cluster12;value]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值