Plot of 3d data in an unit sphere.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Scatter Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!