function [G,XY] = getgraphStar(nnod); % creates the graph of "ring" topology with (nnod) nodes: al = 0:2*pi/(nnod-1):2*pi-1e-10; XY = [cos(al),0; sin(al),0]'; b=[]; for i=1:nnod-1,b=[b,nnod];i=i+1;end G = sparse([b],[1:nnod-1],1,nnod,nnod); G = spones(G+G'); G = G-spdiags(diag(G),0,nnod,nnod);