MATLAB: Whenever I plot a graph in matlab 2010 it always gives error that “G = graph(s,t) ??? Undefined function or method ‘graph’ for input arguments of type ‘double’.” how can I resolve this

how to plot undirected graph with weighted graph?

G = graph(s,t) ??? Undefined function or method 'graph' for input arguments of type 'double'.

Best Answer

The graph and digraph objects were introduced in release R2015b as shown at the bottom of those documentation pages. You will need to upgrade to release R2015b or later to use these objects.