Error message when plotting network graph in 2018a

I'm having a problem creating a simple network graph from a symmetric adjacency matrix.
A=[0,1,1,0,0;1,0,1,0,0;1,1,0,1,1;0,0,1,0,1;0,0,1,1,0]
G=graph(A);
plot(G);
Creating G is not a problem, but the plot command produces the following error message:
Interestingly, I don't have any problems with R2018b--just with R2018a

2 件のコメント

Hayden
Hayden 2023 年 6 月 27 日
I am having the same error messages when I try to use the graphplot function in the econometrics toolbox for a dtmc plot. I did not have this issue previously, but now it has come up for no reason. I have not changed anything in my code
DGM
DGM 2023 年 6 月 27 日
If you're getting the exact same error, have you tried checking what the main answer suggests?

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

 採用された回答

Steven Lord
Steven Lord 2018 年 11 月 8 日

0 投票

Have you written your own function named rng that is shadowing the rng function included in MATLAB? Check with:
which -all rng

4 件のコメント

Paul Fishback
Paul Fishback 2018 年 11 月 8 日
That was it. The Multivariate Granger Causality Toolbox (MVGC), was causing the conflict. Restarted Matlab, made sure not to load the package, and all is fine. Thanks!!!
Paul Fishback
Paul Fishback 2018 年 11 月 8 日
However, I seemed to have another problem when trying to adjust the node font size:
plot(G,'NodeFontSize',10,'MarkerSize',10);
produces and error message, whereas
plot(G,'MarkerSize',10);
works just fine. Again, the problem appears in 2018a but not 2018b. The error message this time is the following:
Steven Lord
Steven Lord 2018 年 11 月 8 日
We added a number of new properties to allow users to customize node and edge labels in graph plots in release R2018b. NodeFontSize is one of those new properties.
Paul Fishback
Paul Fishback 2018 年 11 月 8 日
Thank you!

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

その他の回答 (1 件)

madhan ravi
madhan ravi 2018 年 11 月 8 日

0 投票

Couldn’t produce that error in 2018b so try
clear all
at the very beginning and try again

1 件のコメント

Paul Fishback
Paul Fishback 2018 年 11 月 8 日
Yes, all is fine with 2018b, which I run locally on my own machine. The issue is with 2018a, which I access remotely. Using clear all does not resolve the issue.

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

カテゴリ

ヘルプ センター および File ExchangeGraph and Network Algorithms についてさらに検索

製品

質問済み:

2018 年 11 月 8 日

コメント済み:

DGM
2023 年 6 月 27 日

Community Treasure Hunt

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

Start Hunting!

Translated by