Network Topology Generator
Last update : 28/2/2007
gnetwork - Perform a graph defined by its nodes coordinates and links
Calling Sequence
-
[g]=gnetwork(n,deb,fin,x,y,length_a)
Parameters
-
n
: network size
-
deb
: links starting nodes
-
fin
: links finishing nodes
-
x
: nodes x-coordinates
-
y
: nodes y-coordinates
-
length_a
: links weights
-
g
: network graph
Description
-
Perform a graph defined by its nodes coordinates and links.
Examples
n=20;
l=10;
L=1000;
x=L*rand(1,n);
y=L*rand(1,n);
deb=int(n*rand(1,l))+1;
fin=int(n*rand(1,l))+1;
length_a=int(sqrt((y(fin(1:l))-y(deb(1:l)))^2+(x(fin(1:l))-x(deb(1:l)))^2));
[g]=gnetwork(n,deb,fin,x,y,length_a);
show_graph(g);
Authors
-
Foued Melakessou
University of Luxembourg
Bibliography
Intra Project 2004-2007
Used Function
gnetwork.