draw a simple complex function

assume z0 = x0 + y0 * i;
if abs(z-z0)=R
then abs(z-z0)-R describes a circle with center of z0 and radius of R;
how can we use matlab to draw it?

回答 (2 件)

madhan ravi
madhan ravi 2020 年 7 月 13 日

0 投票

By defining z as a function of x and y and using fplot()
doc fplot
Alan Stevens
Alan Stevens 2020 年 7 月 13 日

0 投票

How about:
x0 = 1; y0 = 2;
z0 = x0 + y0*i;
R = abs(z0);
theta = 0:1/360:2*pi;
x = x0 + R*cos(theta); y = y0 + R*sin(theta);
plot(x,y)

2 件のコメント

madhan ravi
madhan ravi 2020 年 7 月 13 日
What about z?
Alan Stevens
Alan Stevens 2020 年 7 月 13 日
編集済み: Alan Stevens 2020 年 7 月 13 日
Yes, z needs to be defined as well. I simply took it as zero here for simplicity (the main idea being the use of cos and sin theta).
Didn't think of fplot - a much better idea!

サインインしてコメントする。

カテゴリ

タグ

質問済み:

2020 年 7 月 13 日

編集済み:

2020 年 7 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by