I am looking to draw a graph in MATLAB. My graph is non-bipartite and the matrix for the graph is:
A=[0 1 0 0 0 1 0 0 0 0 0 1 0 0 1 0 %1
1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 %2
0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 %3
0 0 1 0 1 0 0 0 1 0 0 0 0 0 1 0 %4
0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 %5
1 0 0 0 1 0 1 0 0 1 0 0 0 0 0 0 %6
0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 %7
0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 %8
0 0 0 1 0 0 0 1 0 1 0 0 1 0 0 0 %9
0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 %10
0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 %11
1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 %12
0 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 %13
0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 %14
1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 %15
0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0]; %16
When this graph is drawn in MATLAB, the node numbered 16
is to the left of the graph but this should be in the centre.
Is there a way to set up my matrix so that the node 16
is in the centre making the graph non-bipartite?