I want to know about plotting complex function

I want to know about this homework as i show you this images.
I should submit this homework including code,x-y plane graph and u,v plane graph.
z=x+iy and f(z)=2/(z-1)=u(x,y)+iv(x,y) (i is imaginary numbers)
please help me

6 件のコメント

Jae Yoon Kim
Jae Yoon Kim 2018 年 9 月 29 日
sorry... I don't know anything about matlab. So I ask like this I'm very sorry for this.
Walter Roberson
Walter Roberson 2018 年 9 月 29 日
We are not going to give you the answer. However, if you give a try and encounter an error that you are having trouble understanding, then you can post the code and a complete copy of the error message and we will try to explain why that code produces that message.
Zenin Easa Panthakkalakath
Zenin Easa Panthakkalakath 2018 年 10 月 3 日
The coordinate transformation isn't very clear from your question. Can you define u and v ?
Walter Roberson
Walter Roberson 2018 年 10 月 3 日
So you compute f(z) and then say that u = real(f(z)) and v = imag(f(z))
Jan
Jan 2018 年 10 月 6 日
@Jae Yoon Kim: Please do not edit away a question after answers have been given. This is impolite and not respectful for the effort of the ones, who spent their time to help you. Thanks.

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

 採用された回答

Dimitris Kalogiros
Dimitris Kalogiros 2018 年 10 月 4 日
編集済み: Dimitris Kalogiros 2018 年 10 月 5 日

1 投票

clear; clc;
% entire z-plane
x=-3:0.01:3;
y=-3:0.01:3 ;
% our z region
zregion=[];
for n=1:length(x)
for k=1:length(y)
z=x(n)+y(k)*1i;
if abs(z-2)<1
zregion=[zregion z];
end
end
end
% mapping
fzRegion=[];
for n=1:length(zregion)
z=zregion(n);
fz=2/(z-1);
fzRegion=[fzRegion fz];
end
% plot these two regions
figure;
subplot(1,2,1);
plot(real(zregion), imag(zregion), 'b.'); zoom on; grid on; hold on;
plot( [-5 5],[0 0 ], '-k', 'LineWidth', 2 );
plot( [0 0],[-5 5 ], '-k', 'LineWidth', 2 );
axis square;
xlabel('x'); ylabel('y'); title('abs(z-2)<1')
subplot(1,2,2);
plot(real(fzRegion), imag(fzRegion), 'r.'); zoom on; grid on; hold on;
plot( [-200 200],[0 0 ], '-k', 'LineWidth', 2 );
plot( [0 0],[-200 200 ], '-k', 'LineWidth', 2 );
axis square;
xlabel('u'); ylabel('v'); title('f(z)');
But be careful... Point z1=1+j0 is a boundary point of your z-region. As z is approaching z1, f(z) going to infinity.
If you run the above script, you will receive the following graph:

4 件のコメント

Jae Yoon Kim
Jae Yoon Kim 2018 年 10 月 5 日
Thank you so much!! Can I ask you some question?? I want to z0 = 0+io How can I do this??
Walter Roberson
Walter Roberson 2018 年 10 月 5 日
z0 = complex(0, 0);
That is the only way to get a variable whose real and imaginary parts are both 0. In nearly any other context, MATLAB will notice that the imaginary part is 0 and will automatically drop it, leaving you with a variable that is not specifically marked as imaginary.
The only time that z0 = 0; meaningfully differs from z0 = complex(0, 0); has to do with accessing external interfaces that might require a variable that is internally marked as being complex.
Walter Roberson
Walter Roberson 2018 年 10 月 5 日
Put it where-ever you wanted z0 = 0+i0 ?
Dimitris Kalogiros
Dimitris Kalogiros 2018 年 10 月 5 日
If you want to calculate f(zo), where zo=0+j0 , you have to do the followings:
zo=complex(0,0);
wo=2/(zo-1); % wo=f(zo)
But be aware that zo=0+j0 does not belong to your area of interest ( |z-2|<1 )

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSpecial Functions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by