フィルターのクリア

get adjacent matrix from horizontal visibility Graph code.

5 ビュー (過去 30 日間)
Vedant Chauhan
Vedant Chauhan 2022 年 4 月 17 日
回答済み: SAI SRUJAN 2023 年 10 月 11 日
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.

回答 (1 件)

SAI SRUJAN
SAI SRUJAN 2023 年 10 月 11 日
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.

カテゴリ

Help Center および File ExchangeDirected Graphs についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by