Borrar filtros
Borrar filtros

get adjacent matrix from horizontal visibility Graph code.

5 visualizaciones (últimos 30 días)
Vedant Chauhan
Vedant Chauhan el 17 de Abr. de 2022
Respondida: SAI SRUJAN el 11 de Oct. de 2023
i want to get adjacency matrix from horizontal visibility graph code. i know that reshaping dvd as 1xnumel(dvd) would get adjancency matrix 12x12 but i have to run graph code for each column by using for loop columnwise on smaller data (dvd) and get a single adjacent matrix, i am trying this so that i can also run this for large data,which gives me adjancency matrix of 1048560x1048560.

Respuestas (1)

SAI SRUJAN
SAI SRUJAN el 11 de Oct. de 2023
Hi Vedant Chauhan,
I understand that you are trying to find the adjacency matrix of a graph.
In MATLAB,you have the ability to get the adjacency matrix of a graph using "adjacency" function.You can follow the below given example to resolve the issue.
A = [0 5 3 0;0 0 1 2; 0 0 0 11; 0 0 0 0];
G = graph(A,'upper');
B = adjacency(G);
For a comprehensive understanding of the "adjacency" function in MATLAB, please refer to the provided documentation below.

Categorías

Más información sobre Directed Graphs en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by