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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Scatter Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!