www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/PolarCoordinateSystemExample.m

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

% Copyright 2015 The MathWorks, Inc.


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