![](https://csdnimg.cn/release/download_crawler_static/86958487/bg5.jpg)
用 cluster 函数创建聚类:
>>
x=[3.02,131.5,101.8,2.18;3.44,173.8,118.0,2.69;5.12,277.0,136.0,4.25;5.41,321.0,138.0,4.78;2.58,
242.0,103.0,2.63;1.87,210.8,102.0,2.11];
>> T=clusterdata(x,0.5)'
T =
2 1 3 3 4 4
>> xx=zscore(x);
>> Y=pdist(xx)
Y =
Columns 1 through 9
1.2539 3.7491 4.4988 1.6822 1.4105 2.5851 3.3635 1.4581
1.6335
Columns 10 through 15
0.8270 3.0497 3.7138 3.6297 4.3471 0.8206
>> S=squareform(Y)