0

タイトルがすでに言っているように、スパニングツリーをプロットしようとしています。

しかし、グラフをプロットしようとすると、次のエラーが発生します。

Error using rng
Too many input arguments.

Error in matlab.internal.graph.MLGraph/forceLayout>layoutOneConnComp (line 82)
    oldstate = rng(0,'twister');

Error in matlab.internal.graph.MLGraph/forceLayout (line 55)
        [x,y] = layoutOneConnComp(x,y,sources,targets,iterations);

Error in matlab.graphics.chart.primitive.GraphPlot/layoutforce

Error in matlab.graphics.chart.primitive.GraphPlot/layout>layoutauto

Error in matlab.graphics.chart.primitive.GraphPlot/layout

Error in matlab.graphics.chart.primitive.GraphPlot

Error in graph/plot (line 110)
hObj = matlab.graphics.chart.primitive.GraphPlot('BasicGraph', ...

追加情報:

GrangerLandN={ 'X' 'Y' 'Z' ...}';
GrangerCoal={ 'A' 'B' 'C' ...}'; 
GrangerValues=(1,2,3,...)'; 

GG=graph(GrangerLandN,GrangerCoal,GrangerValues)

GG = 

  graph with properties:

    Edges: [100×2 table]
    Nodes: [20×1 table]

plot(GG) %also tried plot(GG,'EgdesLabel',GG.Edges.Weight) but both are throwing the error stated above. 

より少ない観察で同じことを試みたところ、完全にうまくいきました。エラーの理由と、コードを修正するにはどうすればよいですか?

4

1 に答える 1