Extract clusters info from dendrogram as a matrix
Show older comments
Hello,
Wondering if somebody could guide me here...
I do have data from instruments at different locations (Latitude and Longitude) and depths, and I need to cluster these based on their proximity, and I can do that fine, but I also need to extract the info from the clusters for another analysis.
This is a very short example of my data:
ID Depth Lat Lon
A1 0.33 -14.28 -170.56
A2 2 -14.24 -169.42
A3 15 -14.33 -170.83
A4 14.95 -11.06 -171.09
A5 17 -14.28 -170.72
A6 14.8 -0.38 -160.02
A7 1.5 5.87 -162.05
A8 0.33 -0.38 -160.02
A9 12.8 -0.38 -160.02
A10 2.8 -0.38 -160.02
A11 7 -0.38 -160.02
A12 9.8 -0.38 -160.02
A13 10 -0.38 -160.02
This is the result of using the function dendrogram, with a line at 150 (x-axis), which represent the cluster max cut that I want to apply based on the data I have. </matlabcentral/answers/uploaded_files/100362/test.jpg>
What I need is to extract the clusters in a way similar to this:
Cluster ID Depth Lat Lon
1 A7 1.5 5.87 -162.05
2 A8 0.33 -0.38 -160.02
2 A11 7 -0.38 -160.02
3 A12 9.8 -0.38 -160.02
3 A13 10 -0.38 -160.02
3 A9 12.8 -0.38 -160.02
3 A6 14.8 -0.38 -160.02
4 A4 14.95 -11.06 -171.09
5 A3 15 -14.33 -170.83
6 A5 17 -14.28 -170.72
7 A1 0.33 -14.28 -170.56
8 A2 2 -14.24 -169.42
Thank you for your suggestions and/or directions to an existent answer, if that is the case.
Accepted Answer
More Answers (0)
Categories
Find more on Hierarchical Clustering in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!