MATLAB: Compilation error when using graph method.

compilationerrorgraphgraph theorymethods

iam trying to create directed and undirected graph,i used this code: s = [1 2 1 3]; t = [2 3 3 4]; w = [10 20 30 5]; G=graph(s,t,w); but i face this problem when compile code: Undefined function or method 'graph' for input arguments of type 'double'. Thanks

Best Answer

  • The graph object was introduced in release R2015b, as shown by the note at the end of that documentation page. If you're using an earlier release, you will not be able to use this object.