<< 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 {n x n} matrix where the non-diagonal component Aij rates 1 is there is an edge between the nodes i and j (0 otherwise).

Examples

[g]=NARVAL_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=NARVAL_G_ShowGraph(g,ind);//graph visualization
[A]=NARVAL_G_AdjacencyMatrix(g);//application of NARVAL_G_AdjacencyMatrix
A

Authors

Foued Melakessou

Contact

Dr. Foued Melakessou

Research Associate

Interdisciplinary Centre for Security, Reliability and Trust

Room F106

University of Luxembourg

6, rue Coudenhove Kalergi

L-1359 Luxembourg-Kirchberg

E-mail: foued.melakessou@uni.lu

Tel: (+352) 46 66 44 5346

Home Page


<< NARVAL_G_AddNodes NARVAL NARVAL_G_Assortativity >>