adjMatrixSpreadStud​y(A, s0, N, varargin)

Spreading of an event in a network graph through an adjacency matrix
Updated 1 Jul 2017

View License

This function enables "event spreading" study in a network.
It is based upon adjacency matrix algebra, and suppose fixed time iteration period.
By providing an adjacency matrix and an event vector (consisting of the node by which the spreading starts), one can find 1) at which iteration the event has spread over the whole network, 2) history of the nodes states in regard to the spreading.
Optionnaly, a GraphML output of each iteration will be exported for visual analysis.
Traversal of the various initial states can be automated with the following code. The temporal of each full-spread run will be available in the t_ret variable :
sourceFilePath = 'C:\Temp\adj_matu.txt';
A = importdata(sourceFilePath);
size_A = size(A, 1);
N = 50;
t_ret = [];
for i = 1 : size_A
s00 = zeros(1, size_A);
s00(1,i) = 1;
t = adjMatrixSpreadStudy(A, s00, N);
t_ret = [t_ret t];

Cite As

Lionel Tailhardat (2024). adjMatrixSpreadStudy(A, s0, N, varargin) (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2017a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Construction in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes