How can I build branches from an adjacency matrix.

1 visualización (últimos 30 días)
Eyman FAKHRI
Eyman FAKHRI el 25 de Jun. de 2018
Editada: Eyman FAKHRI el 27 de Jun. de 2018
Hello, In my optimization program, I want to penalize branches that have a high number of nodes. For that I must build branches from an adjacency matrix.
Let's take an example, I will consider the graph and the adjacency matrix in the attached figure.
The last node number in the matrix node (the highest) is always the reference node.
Therefore the adjacency matrix is :
0 1 0 0 0 0 0
1 0 0 0 0 0 1
0 0 0 1 0 0 0
0 0 1 0 0 1 1
0 0 0 0 0 0 1
0 0 0 1 0 0 0
0 1 0 1 1 0 0
So I need to obtain vectors that contain branch nodes:
Branch 1: 7 2 1
Branch 2: 7 4 3 6
Branch 3: 7 5
Thank you so much for your help !

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by