How to define G=graph(s,​t,weights,​NodeTable)

4 ビュー (過去 30 日間)
phdcomputer Eng
phdcomputer Eng 2018 年 4 月 24 日
コメント済み: Walter Roberson 2018 年 5 月 16 日
My method is to create a social network based on a dataset in Matlab. I attached my excel dataset to this question. Each node represents a stakeholder, the edge shows communication among two stakeholders and its weight indicates the total instance of communication between them. I think the following method is appropriate to my subject: G=graph(s,t, weights, NodeTable); How can I define the above variables with this regards that my dataset includes letters? I will be grateful to have any similar examples or related link in this field.

採用された回答

Walter Roberson
Walter Roberson 2018 年 4 月 24 日
>> S = {'harold', 'harold', 'lucy'}, T = {'sally', 'maude', 'maude'}
S =
1×3 cell array
{'harold'} {'harold'} {'lucy'}
T =
1×3 cell array
{'sally'} {'maude'} {'maude'}
>> G = graph(S,T)
G =
graph with properties:
Edges: [3×1 table]
Nodes: [4×1 table]
>> plot(G)
  22 件のコメント
phdcomputer Eng
phdcomputer Eng 2018 年 5 月 16 日
In your opinion which method is better for my graph: installing the community detection toolbox or writing codes for graph clustering?
Walter Roberson
Walter Roberson 2018 年 5 月 16 日
I do not know anything about that toolbox. Typically using an existing toolbox is easier than writing your own code.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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