%% Polar Coordinate System
% A simple color wheel illustrates a polar coordinate system.

n = 6;
r = (0:n)'/n;
theta = pi*(-n:n)/n;
X = r*cos(theta);
Y = r*sin(theta);
C = r*cos(2*theta);
pcolor(X,Y,C)
axis equal tight

% Copyright 2015 The MathWorks, Inc.