<< NL_G_AddNodes NL_G: Graph NL_G_Assortativity >>

NARVAL >> NL_G: Graph > NL_G_AdjacencyMatrix

NL_G_AdjacencyMatrix

Compute the adjacency matrix of a graph.

Calling Sequence

[A] = NL_G_AdjacencyMatrix(G)

Arguments

G :

Graph.

A :

Adjacencency matrix.

Description

NL_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 matrix where the non-diagonal component rates 1 is there is an edge between the nodes and (0 otherwise).

Examples

[g]=NL_G_MakeGraph('g',4,[1 2 3 4],[2 3 4 1],[100 100 900 900],[100 900 900 100]);//generation of the a graph
//Adjacency matrix od size 4x4
//|A11 A12 A13 A14|
//|A21 A22 A23 A24|
//|A31 A32 A33 A34|
//|A41 A42 A43 A44|
ind=1;//window index
f=NL_G_ShowGraphN(g,ind);//graph visualization
[A]=NL_G_AdjacencyMatrix(g)//application of NL_G_AdjacencyMatrix

Report an issue
<< NL_G_AddNodes NL_G: Graph NL_G_Assortativity >>