필터 지우기
필터 지우기

Surface of complex numbers

조회 수: 2 (최근 30일)
Sk. Sarif Hassan
Sk. Sarif Hassan 2014년 10월 30일
I have a following code which geenrates a set of complex numbers. I want to get a surface plot of these complex numbers. I also would like to get the surface for real part and imaginary part of these complex numbers, individually.
clc;
clear all;
for ff=1:200
a=randi([-100, 100]);
b=randi([-100, 100]);
c=randi([-100, 100]);
d=randi([-100, 100]);
e=52;%randi([-100, 100]);
f=-17;%randi([-100, 100]);
g=-2;%randi([-100, 100]);
h=39;%randi([-100, 100]);
z0=complex(a,b);
z1=complex(c,d);
alpha=complex(e,f);
beta=complex(g,h);
k=500000;
Zarray = zeros(k,2);
for n=1:k
Z=(alpha/z0)+(beta/z1);
z0=z1;
z1=Z;
Zarray(n,1) = real(Z);
Zarray(n,2) = imag(Z);
end
fig=figure('Visible','on');
plot(Zarray(:,1), Zarray(:,2),'r*');
xlabel('Real','fontsize',15);
ylabel('Imaginary','fontsize',15);
saveas(fig,'fig.bmp');
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Elementary Polygons에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by