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 commentaires

DGM
DGM le 19 Août 2021
What does "distance" mean in this context?
Are 3 vectors wich lengths are of 180 elements.

Connectez-vous pour commenter.

 Réponse acceptée

DGM
DGM le 19 Août 2021
Modifié(e) : DGM le 19 Août 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

Plus de réponses (0)

Catégories

En savoir plus sur Contour Plots dans Centre d'aide et File Exchange

Produits

Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by