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);

Answers (0)

Tags

Asked:

on 18 Feb 2013

Community Treasure Hunt

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

Start Hunting!