Problem came up while trying to generate a graph in MuPAD

1 view (last 30 days)
Hi, I am using MATLAB to work with my data. Some of them consists with 83*83 or 1015*1015 matrices. Then I wanted to plot a graph (according to graph theory). This is not available in MATLAB but in MuPAD. So I saved my data in .dat format from MATLAB and imported the matrix into MuPAD using import::readdata (filename). Now when I tried to use the Graph::createGraphFromMatrix(filename) command to draw the graph, it gives me the following warnings and then the error.
Warning: Uninitialized variable 'i' is used. Evaluating: Graph::createGraphFromMatrix
Warning: Uninitialized variable 'j' is used. Evaluating: Graph::createGraphFromMatrix
Error: The argument is invalid. [_concat] Evaluating: Graph::checkForVertices
Can anybody help me to overcome this error?
At first I am using a 83*83 binary matrix to draw the graph. When I tried with random graphs, it works perfectly.
Thank you in advance.
  1 Comment
Star Strider
Star Strider on 17 Jul 2014
The only thing that comes to mind is to use something other than ‘i’ and ‘j’. Those are imaginary operators, so it is not good practice to use them as index or other variables.

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!