How can I use the graph()-function

조회 수: 3 (최근 30일)
Christian
Christian 2015년 9월 9일
답변: Christian 2015년 9월 10일
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일
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
Sean de Wolski
Sean de Wolski 2015년 9월 9일
dbstop if error
To stop in debug mode, then:
which -all graph
When the error occurs

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Christian
Christian 2015년 9월 10일
Thanks, you are right... I worked the whole time with a structure named graph. Thank a lot, Chris

카테고리

Help CenterFile Exchange에서 Networks에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by