Hello everyone:
I have a vector 'theta' that runs from 0 to 360 and have 180 items (theta = linspace(0,360,180)); and three vectors of dinstances d1,d2, d3 at r1 r2 and r3. I need to plot a polar contour plot of distances with this data.
thnx

2 Comments

What does "distance" mean in this context?
Are 3 vectors wich lengths are of 180 elements.

Sign in to comment.

 Accepted Answer

DGM
DGM on 19 Aug 2021
Edited: DGM on 19 Aug 2021
I'm going to assume "distance" maps to the height of an annular surface.
EDIT: I just realized you said 'contour' and not 'surf'. Added both
npoints = 10;
th = linspace(0,360,npoints);
r = [1; 2; 3].*ones(3,npoints);
d = rand(3,npoints); d(:,end) = d(:,1);
x = r.*cosd(th);
y = r.*sind(th);
subplot(2,1,1)
h = surf(x,y,d);
axis equal
shading interp
h.EdgeColor = [0 0 0];
subplot(2,1,2)
[~,h] = contourf(x,y,d);
axis equal

More Answers (0)

Categories

Products

Release

R2020b

Community Treasure Hunt

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

Start Hunting!