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];
Lionel Tailhardat (2021). adjMatrixSpreadStudy(A, s0, N, varargin) (https://www.mathworks.com/matlabcentral/fileexchange/63600-adjmatrixspreadstudy-a-s0-n-varargin), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!