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

orientation

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