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 Kommentare

DGM
DGM am 19 Aug. 2021
What does "distance" mean in this context?
Are 3 vectors wich lengths are of 180 elements.

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

DGM
DGM am 19 Aug. 2021
Bearbeitet: DGM am 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

Weitere Antworten (0)

Kategorien

Mehr zu Contour Plots finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by