1
function X = circle_layout(G,radius)
2
% CIRCLE_LAYOUT Layout the vertices of a graph on a circle
4
% X = circle_layout(G) generates a layout of graph with vertices uniformly
5
% placed on the circle. This function does no interesting layout and just
6
% places the vertices around the circle in order.
8
% X = circle_layout(G,radius) places the vertices with a radius other than
13
% X = circle_layout(G);
17
% Copyright, Stanford University, 2008
20
% 2008-09-25: Initial coding
23
if ~exist('radius','var') || isempty(radius), radius = 1.0; end;
27
X(:,1) = radius*cos( (0:n-1)'*2*pi/n );
28
X(:,2) = radius*sin( (0:n-1)'*2*pi/n );