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

DGM
DGM 2021년 8월 19일
What does "distance" mean in this context?
Are 3 vectors wich lengths are of 180 elements.

댓글을 달려면 로그인하십시오.

 채택된 답변

DGM
DGM 2021년 8월 19일
편집: DGM 2021년 8월 19일

0 개 추천

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Contour Plots에 대해 자세히 알아보기

제품

릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by