Running
figure; plot(digraph([0,0,1;1,0,0;1,0,0]))
on R2016a throws the error
Error using svdInput to SVD must not contain NaN or Inf.Error in orth (line 15)[Q,S] = svd(A,'econ'); %S is always square.
Error in matlab.internal.graph.MLGraph/subspaceLayout>layoutOneConnComp (line 55) M = orth(M);Error in matlab.internal.graph.MLGraph/subspaceLayout (line 29) xy = layoutOneConnComp(G,dim,1:G.NodeCount,L,deg);Error in matlab.graphics.chart.primitive.GraphPlot/layoutforceError in matlab.graphics.chart.primitive.GraphPlot/layout>layoutautoError in matlab.graphics.chart.primitive.GraphPlot/layoutError in matlab.graphics.chart.primitive.GraphPlotError in digraph/plot (line 96)hObj = matlab.graphics.chart.primitive.GraphPlot('BasicGraph', ...
Using (e.g.) the circle layout works fine. Is there a workaround that lets me use the default/force layout or must I resort to something like a try/catch?
Best Answer