function [G,XY] = getgraphRhomboidmesh(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:2:nnod-1,b=[b,nnod];i=i+1;end G = sparse([1:nnod-1,b],[2:nnod-1,1,1:2:nnod-1],1,nnod,nnod); G = spones(G+G'); G = G-spdiags(diag(G),0,nnod,nnod); %G(5,8)=1;G(8,5)=1;G(6,9)=1;G(9,6)=1;G(8,9)=1;G(9,8)=1;