Hello, I didn't find a way for labeling the objects in a dendrogram.
The code I'm using is like this:
A = dataset('XLSFile','MyExcelFile.xlsx');
MyVars = double(A(:,{'Var1', 'Var2', 'Var3'}));
clustVars = pdist(MyVars,'euclidean');
linkVars = linkage(clustVars,'average');
[h,nodes] = dendrogram(linkVars,0);
- Load the Excel file into a dataset array
- Create a double-precision array containing the variables
- Compute the Euclidean distance
- Execute the clustering method
- Draw the dendrogram
In my dataset array A I have a variable that contains the names of the vectors.
Of course I can't include that variable in the analysis.
Can somebody explain me how to label the objects in a cluster analysis using that variable, let's call it objNames?
Thanks in advance,
Diego