How to create an adjacency matrix with a hexagonal structure

6 views (last 30 days)
I have a cluster of nodes constructed as a mesh of angled hexagons. How do I create the adjacency matrix from this structure where each hexagon acts as a node?
grid hex angled

Answers (1)

BhaTTa
BhaTTa on 20 Nov 2024 at 5:36
Edited: BhaTTa on 20 Nov 2024 at 5:37
Hey @ally, first you have to number each of the hexagonal nodes, then see which all nodes are directly connected to the given numbered node and then make use of adjacency matrix or adjacency list that you have created to represent the graph to mark edge between the nodes.

Products


Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!