필터 지우기
필터 지우기

3D plot in a circle

조회 수: 2 (최근 30일)
Farid sjdclkjas
Farid sjdclkjas 2014년 5월 9일
댓글: Star Strider 2014년 5월 9일
Hi everybody,
I have the followng function: Sx=(SH*(sin(a))^2+Sh*(cos(a))^2)*sin(i)+Sv*(sin(i))^2;
SH, Sh and Sv have constant values, but "a" and "i" are angles which change from 0-360 and 0-90; respectivly. I want to plot Sx vs "a" & "i" in a circle like the picture.The color bar in the right side of this graph shows the range for Sx values. This circle is partitioned with internal dashed lines and circles. The dashed lines show "a" values changing from 0-360 degrees. each internal dashed circle shows a value for “i” changing from 0 to 90 degrees. The bigger the dashed circle, the larger the i values.
Can anyone offer any suggestions? Thanks.

채택된 답변

Star Strider
Star Strider 2014년 5월 9일
I can’t get it to look exactly like the figure you posted( I don’t have the correct values for the constants), but this will work for a start:
SH = 3; Sh = 5; Sv = 7;
Sx=@(a,i) (SH.*(sin(a)).^2+Sh.*(cos(a)).^2).*sin(i)+Sv.*(sin(i)).^2;
a = 0:360;
i = 0:90;
[A, I] = meshgrid(0:360, 0:90);
Sxc = Sx(A, I);
[Aa, Ir, Scp] = pol2cart(A, I, Sxc);
figure(2)
contour(Aa, Ir, (Scp))
grid on
colormap('jet')
axis equal tight
  댓글 수: 2
Farid sjdclkjas
Farid sjdclkjas 2014년 5월 9일
Thank you for your help. your code is correct and realy helps me.
Star Strider
Star Strider 2014년 5월 9일
My pleasure!

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

추가 답변 (1개)

A Jenkins
A Jenkins 2014년 5월 9일

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by