フィルターのクリア

How to plot DAG with digraph function

2 ビュー (過去 30 日間)
Sunil Arora
Sunil Arora 2016 年 6 月 10 日
コメント済み: VASUNDHARA V 2022 年 2 月 18 日
I am trying to run digraph function on Matlab 7 but it shows undefined function. is it required any higher function? I have also tried it on Matlab 2013 but it is not working. I have given below the code as below
s = [1 2 1]; t = [2 3 3]; G = addedge(G,s,t); please respond as early possible. sunil Arora

回答 (1 件)

Alexander Wille
Alexander Wille 2016 年 6 月 26 日
Hi Sunil,
your code fragment seems to be missing the initialization of the digraph. You would also want to add a plot-command. How about this:
s = [1 2 1];
t = [2 3 3];
G = digraph();
G = G.addedge(s,t);
G.plot();
I'm not sure I understood your answer correctly, but I think you also wanted to know which was the earliest release that includes the digraph function. The first release to include digraph is MATLAB release 2015b. Is that what you needed?
Cheers Alex
  1 件のコメント
VASUNDHARA V
VASUNDHARA V 2022 年 2 月 18 日
Thankyou alex..i downloaded the latest version 2020 matlab as digraph function is not in 2013.
cheers vasundhara

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

カテゴリ

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