<< NARVAL_G_AddNodes NARVAL NARVAL_G_Assortativity >>

NARVAL >> NARVAL > NARVAL_G_AdjacencyMatrix

NARVAL_G_AdjacencyMatrix

Compute the adjacency matrix of a graph.

Calling Sequence

[A]=NARVAL_G_AdjacencyMatrix(g)

Parameters

g :

graph.

A :

adjacencency matrix.

Description

NARVAL_G_AdjacencyMatrix computes the adjacency matrix A of the graph g. By definition, the adjacency matrix of a finite graph of size n is the nxn matrix where the non-diagonal component Aij rates 1 is there is an edge between nodes i and j (0 otherwise).

Examples

[g]=NARVAL_G_MakeGraph('g',4,[1 2 3 4],[2 3 4 1],[100 100 200 200],[100 200 200 100]);//generation of the a graph
ind=1;
f=NARVAL_G_ShowGraph(g,ind);
[A]=NARVAL_G_AdjacencyMatrix(g);//application of NARVAL_G_AdjacencyMatrix
A

Author

http://wwwen.uni.lu/interdisciplinary_centre_for_security_reliability_and_trust

Contact

<< NARVAL_G_AddNodes NARVAL NARVAL_G_Assortativity >>