フィルターのクリア

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 Center および File ExchangeElementary Polygons についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by