MATLAB Answers

How to quickly combine some lines in a network?

1 view (last 30 days)
Benson Gou
Benson Gou on 7 Nov 2018
Dear All,
For a given network formed by edges and lines, I want to combine some lines in this network to generate a new network with ordered edges ID. For example, for a given network G1, LINES = [1 2;2 3;3 4;1 4;2 4;2 5;5 6;2 6;6 3]. Each row in LINES indicates a line from an edge to another edge. If I want to combine edges 3 and 6, the final network will be G2: LINES = [1 2;2 3;3 4;1 4;2 4;2 5;5 3], where there are 2 lines between edges 2 and 3 (previously lines 2-3 and 2-6).
This is a very simple example. The network I am working with has 10000 edges and more than 10000 lines. If I want to combine 100 lines in this network, does anyone have a good idea?
Thanks a lot. Benson

  0 Comments

Sign in to comment.

Answers (0)


Translated by