I have tried following code for creating sparse graph in MATLAB:
cm = sparse([1 1 2 2 3 3 4 5],[2 3 4 5 4 5 6 6],...
[2 3 3 1 1 1 2 3],6,6)cm =
Congratulations, you have found a bug in the MATLAB documentation!
The cm =
at the end belongs on the next line and is actually the output MATLAB gives you when you type
cm = sparse([1 1 2 2 3 3 4 5],[2 3 4 5 4 5 6 6],...
[2 3 3 1 1 1 2 3],6,6)
MATLAB uses linebreaks to signify the end of a command unless you end the line with ...
, and after the closing bracket on your second line it doesn't understand what the cm
is supposed to mean ;-)