calcCluster
(method of orientation)
sort orientations into clusters
Syntax
[c,center] = calcCluster(ori,'halfwidth',2.5*degree) [c,center] = calcCluster(ori,'numCluster',n,'method','hierarchical') [c,center] = calcCluster(ori,'maxAngle',omega,'method','hierarchical')
Input
ori | |
n |
number of clusters |
omega |
maximum angle |
Output
c |
list of clusters |
center |
center of the clusters |
Example
% generate orientation clustered around 5 centers cs = crystalSymmetry('432'); center = orientation.rand(5,cs); odf = unimodalODF(center,'halfwidth',5*degree) ori = odf.calcOrientations(1500);
odf = ODF crystal symmetry : 432 specimen symmetry: 1 Radially symmetric portion: kernel: de la Vallee Poussin, halfwidth 5° center: Rotations: 5x1 weight: 1
% find the clusters and its centers
[cId,centerRec] = calcCluster(ori);
.......................................
% visualize result for i = 1:length(centerRec) plot(ori(cId==i),'axisAngle') hold on plot(centerRec(i),'MarkerFaceColor','k','MarkerSize',15) end hold off

%check the accuracy of the recomputed centers
min(angle_outer(center,centerRec)./degree)
ans = Columns 1 through 7 1.2597 0.9473 0.5851 1.0149 0.5956 13.7421 13.9141 Column 8 14.7302
MTEX 4.6.beta.1 |