How can I use the graph()-function

1 Ansicht (letzte 30 Tage)
Christian
Christian am 9 Sep. 2015
Beantwortet: Christian am 10 Sep. 2015
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

Akzeptierte Antwort

Steven Lord
Steven Lord am 9 Sep. 2015
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 Kommentar
Sean de Wolski
Sean de Wolski am 9 Sep. 2015
dbstop if error
To stop in debug mode, then:
which -all graph
When the error occurs

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Christian
Christian am 10 Sep. 2015
Thanks, you are right... I worked the whole time with a structure named graph. Thank a lot, Chris

Kategorien

Mehr zu Networks finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by