How do I fit this contourf plot in polar coordinates?

Hi there,
dist = 21x144 array. I want 'dist' to form a ring donut shape around the middle the upper data starting at r = 20 and the lower limit at r = 21. And the 144 being each th step at the moment I just make this: http://postimg.org/image/pytok4msf/
code:
[r,t] = meshgrid(0:.1:5,0:pi/30:(2*pi));
z = r - t;
% Convert to Cartesian
x = r.*cos(t);
y = r.*sin(t);
h = polar(x,y);
hold on;
contourf(dist);
% Hide the POLAR function data and leave annotations
set(h,'Visible','off')
% Turn off axes and set square aspect ratio
axis off
axis image

Answers (0)

Categories

Asked:

on 4 Mar 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!