Plot of 3d data in an unit sphere.

1 次查看(过去 30 天)
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 个)

类别

Help CenterFile Exchange 中查找有关 Scatter Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by