Effacer les filtres
Effacer les filtres

get adjacent matrix from horizontal visibility Graph code.

1 vue (au cours des 30 derniers jours)
Vedant Chauhan
Vedant Chauhan le 17 Avr 2022
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.

Réponses (1)

SAI SRUJAN
SAI SRUJAN le 11 Oct 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.

Catégories

En savoir plus sur Graph and Network Algorithms dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by