How can I use the graph()-function

If I use the graph()-function to create a Graph object it works only if the workspace is clear. I use type
A= [0 1 0 1;1 0 1 1;0 1 0 1;1 1 1 0]; G= graph(A);
it works. If I use the same code in a project and I insert this lines the following error occurs: "Subscript indices must either be real positive integers or logicals." I don't use the variable A or G otherwise in the project... Thanks for helping, Chris

 采纳的回答

Steven Lord
Steven Lord 2015-9-9

1 个投票

You have created a variable named graph in the "project" function or script. Change the name of that variable if you want to use the GRAPH function introduced in release R2015b.

1 个评论

dbstop if error
To stop in debug mode, then:
which -all graph
When the error occurs

请先登录,再进行评论。

更多回答(1 个)

Christian
Christian 2015-9-10

0 个投票

Thanks, you are right... I worked the whole time with a structure named graph. Thank a lot, Chris

类别

帮助中心File Exchange 中查找有关 Startup and Shutdown 的更多信息

产品

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by