How to create an adjacency matrix with a hexagonal structure

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

回答(1 个)

BhaTTa
BhaTTa 2024-11-20
编辑:BhaTTa 2024-11-20
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.

类别

帮助中心File Exchange 中查找有关 Numerical Integration and Differentiation 的更多信息

产品

版本

R2018b

提问:

2019-3-3

编辑:

2024-11-20

Community Treasure Hunt

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

Start Hunting!

Translated by