- 9
- 0
- 约5.37千字
- 约 9页
- 2016-07-25 发布于浙江
- 举报
《计量地理学》(徐建华,高等教育出版社,2005)配套实习指导
PAGE
PAGE 45
§8.利用Matlab和SPSS软件实现聚类分析
1. 用Matlab编程实现
运用Matlab中的一些基本矩阵计算方法,通过自己编程实现聚类算法,在此只讨论根据最短距离规则聚类的方法。
调用函数:
min1.m——求矩阵最小值,返回最小值所在行和列以及值的大小
min2.m——比较两数大小,返回较小值
std1.m——用极差标准化法标准化矩阵
ds1.m——用绝对值距离法求距离矩阵
cluster.m——应用最短距离聚类法进行聚类分析
print1.m——调用各子函数,显示聚类结果
聚类分析算法
假设距离矩阵为vector, a阶,矩阵中最大值为max,令矩阵上三角元素等于max
聚类次数=a-1,以下步骤作a-1次循环:
求改变后矩阵的阶数,计作c
求矩阵最小值,返回最小值所在行e和列f以及值的大小g
for l=1:c,为vector(c+1,l)赋值,产生新类
令第c+1列元素,第e行和第f行所有元素为,第e列和第f列所有元素为max
源程序如下:
%std1.m,用极差标准化法标准化矩阵
function std=std1(vector)
max=max(vector); %对列求最大值
min=min(vector);
[a,b]=size(vecto
您可能关注的文档
- 《Design and Analysis of a coreless flyback converter》.ppt
- 《Design and characterization of a signal insulation coreless transformer integrated in a CMOS gate driver chip》.ppt
- 《Design of Low Power Multiple Output Power Supply for Embedded Systems》.ppt
- 《ESD Protection Device With Dual Polarity Conduction and High Blocking Voltage Realized in CMOS Process》.pptx
- 《Experimental Verification of a One-turn Transformer Power Supply Circuit for Gate Drive Unit》.ppt
- 《Fast transient response high-accuracy current-sensing technique for step-up DC–DC converter》.pptx
- 《Fully Integrated Isolated DC-DC Converter Using Micro-Transformers》.ppt
- 《Fully-Integrated On-Chip DC-DC Converter With a 450X Output Range》.pptx
- 《Improvement on CDMESD Robustness of High Voltage Tolerant bLDMOS SCR Devices by Using DDG》.pptx
- 《Improving ESD robustness of stacked diodes with embedded SCR for RF applicatuins in 65nm CMOS》.pptx
- 浙江四校(含精诚联盟)2025-2026学年高二下学期3月阶段检测数学+答案.pdf
- 云南金太阳2025-2026学年高一下学期3月开学考试英语试题+答案.pdf
- 银川市、石嘴山市、吴忠市三市2026年高三年级学科教学质量检测生物+答案.docx
- 云南金太阳2025-2026学年高一下学期3月开学考试历史试题+答案.pdf
- 湖北省云学联盟2025-2026学年高二下学期3月学科素养测评英语试卷(含答案).pdf
- 河南天一大联考2026年高一3月联考语文试题.docx
- 河南天一大联考2026年高一3月联考语文试题.pdf
- 浙江四校(含精诚联盟)2025-2026学年高一下学期3月阶段检测英语+答案.docx
- 浙江四校(含精诚联盟)2025-2026学年高一下学期3月阶段检测政治+答案.docx
- 浙江四校(含精诚联盟)2025-2026学年高二下学期3月阶段检测地理+答案.pdf
原创力文档

文档评论(0)