function G = stargraph(n) G = zeros(n); G(2:n,1) = ones(1,n-1); G(1,2:n) = ones(n-1,1); return