%% Create Compass Plot Using Polar Coordinates
% Create a compass plot using polar coordinates by first converting them to Cartesian coordinates.
% To do this, specify data using polar coordinates. Convert them to Cartesian coordinates using the pol2cart function. Then, create the plot.

th = linspace(pi/4,2*pi,10);
r = linspace(5,20,10);
[u,v] = pol2cart(th,r);
compass(u,v)

% Note that the theta-axis and r-axis tick labels correspond to the polar coordinates.
% Copyright 2020 The MathWorks, Inc.