READGRAPH Read a graph from a text file. [NODES EDGES] = readGraph(FILENAME) Example % create a basic graph, save it to a file, and read it again nodes = [10 10;20 10;10 20;20 20;27 15]; edges = [1 2;1 3;2 4;2 5;3 4;4 5]; writeGraph(nodes, edges, 'simpleGraph.txt'); [n2 e2] = readGraph('simpleGraph.txt'); figure; drawGraph(n2, e2); axis equal; axis([0 40 0 30]); See also writeGraph
Package: matgeom