how to create a plot on a 3D sphere
이전 댓글 표시
Hello,
I'm quite new to Matlab and coming from MEL background. I have a script with loops and then translated to a sphere dimension. Can any one HELP me please as i really would like to generate a isosurface structure with spherical coordinates of the loop function especially.
Any help would be great, thank you.
figure
sphere
for k = 0: 0.5: 1;
r= 1;
for j=0: 1/2pi: 2/pi;
phi= exp(j);
for i=0:pi/2:2*pi;
theta= exp(i);
deltat = 0;
scatter3(k,j,i,[]);
hold on
x=r*sin(i)*cos(j)
y=r*sin(i)*sin(j);
z=r*cos(i);
S = zeros(3,1);
S(1,1) = r*cos(j)*sin(i);
S(2,1) = r*sin(i)*sin(j);
S(3,1) = r*cos(i);
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!