project3.asv
上传用户:miaohui010
上传日期:2013-01-08
资源大小:2540k
文件大小:0k
开发平台:

Matlab

  1. load feature_table;
  2. W=feature_table;
  3. Dist=pdist(W);
  4. Tree=linkage(Dist,'ward');
  5. class=cluster(Tree,3);
  6. class_1=find(class==1);
  7. class_2=find(class==2);
  8. class_3=find(class==3);
  9. n1=size(class_1);
  10. n2=size(class_2);
  11. n3=size(class_3);
  12. for i=1:n1
  13.     1000<=class_1[i]<1500
  14.      a1=a1+1;
  15. end
  16. for i=1:n2
  17.     500<=class_2[i]<1000
  18.      a2=a2+1;
  19. end
  20. for i=1:n3
  21.     0<=class_1[i]<500
  22.      a3=a3+1;
  23. end
  24.  err_bg=(500-a1)/