简体   繁体   中英

Matlab: Undefined function 'graph' for input arguments of type 'cell'

I am using MATLAB R2013b. I don't understand why the following code is giving error-

    a=[1 1 1 2 2 3 3 4 4 5 7];
    b=[2 3 4 3 7 4 6 5 7 6 8];
    names={'A','B','C','D','E','F','G','H'};
    G=graph(a,b,[],names)

Error:Undefined function 'graph' for input arguments of type 'cell'.

The documentation for graph:

https://www.mathworks.com/help/matlab/ref/graph.html

States that graph was introduced in R2015b. The problem is that your version of MATLAB does not contain the graph function.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM