I have a n
xn
adjacency matrix A
of an undirected random graph, so Aij
can be either 0 or 1. If Aij
is 1 that means there is an edge between i
th and j
th node. If it is 0 that means there is no edge between them.
I want to reshuffle the matrix based the degree of the vertices. All the vertices which have degree less than equal to k
, I want to put them at the end. Let say there are m
such vertices, so last m
rows and columns of my new adjacency matrix will represent these vertices.
I want to implement this in MATLAB. I have no idea how to solve it efficiently. Just one think I know how to find such vertices.
a = 1:n;
ver = a(sum(A) < k+1 );
Any help is appreciated.