Plot of 3d data in an unit sphere.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
a=randi([-100, 100]);
c=randi([-100, 100]);
z0=complex(a,0);
z1=complex(c,0);
a=complex(rand(1),rand(1));
sanju=abs(a);
k=5000;
Zarray = zeros(k,2);
for n=1:k
Z=z1^2/(a*z1*(1+z0));
z0=z1;
z1=Z;
Zarray(n,1) = real(Z);
Zarray(n,2) = imag(Z);
end
for s=1:length(Zarray)
r1(s)=Zarray(s,1);
r2(s)=Zarray(s,1);
sp(s,:,:,:)=[(2*r1(s)/(1+r1(s)^2+r2(s)^2)),(2*r2(s)/(1+r1(s)^2+r2(s)^2)), (-1+r1(s)^2+r2(s)^2/(1+r1(s)^2+r2(s)^2))];
end
fig=figure('Visible','on');
surf(sp);
In this code, a matrix 'sp' is created which is 5000*3 data. I want to plot these 5000 3d points in an unit sphere.
I need your help.
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Surface and Mesh Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!