How can I remove all the nodes in my graph without edges

6 ビュー (過去 30 日間)
Niloufar Hojat
Niloufar Hojat 2019 年 7 月 24 日
回答済み: Steven Lord 2019 年 7 月 24 日
Hi,
I have a adjancey matrix with some nodes that dont have any edges, just NaN values for the edge values. How can I remove all the nodes that do not have edges?
Many thanks in advance,
Nima

回答 (1 件)

Steven Lord
Steven Lord 2019 年 7 月 24 日
If you've created a graph or digraph object from your adjacency matrix take a look at the degree, indegree, outdegree, and/or rmnode functions.

カテゴリ

Help Center および File ExchangeGraph and Network Algorithms についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by