Surface of complex numbers

3 views (last 30 days)
Sk. Sarif Hassan
Sk. Sarif Hassan on 30 Oct 2014
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

Answers (0)

Categories

Find more on Elementary Polygons in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!