Surface of complex numbers
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Elementary Polygons 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!