I used different codes to plot the phase of this function f(z) = (0.10 + 0.3i) + (0.4243 + 0.0017i)z + (0.9 − 0.001i)z^2 why I always find discontinuity at Z_R =0

1 回表示 (過去 30 日間)
Aisha Mohamed
Aisha Mohamed 2022 年 6 月 19 日
コメント済み: Jeffrey Clark 2022 年 8 月 7 日
I used the folloing 2 codes from Davidgoodman and Torsten (Thank you very much for all of them) respectivally to plot this function
f(z) = (0.10 + 0.3i) + (0.4243 + 0.0017i)z + (0.9 − 0.001i)z^2
My question IS:
why always find dis continuity at Z_R (the real part of Z) in the phase of this function? and how to avoid this discontinuity?
this are the both codes
This code by Davidgoodman (Thank you very much)
re_z = -1:0.01:1;
im_z = -1:0.01:1;
[re_z,im_z] = meshgrid(re_z,im_z);
z = re_z + 1i*im_z;
caxis([-pi pi])
xlabel('x')
ylabel('y')
p=[(0.9-0.001i) (0.4243 + 0.0017i) (0.10 + 0.3i)];
f_of_z_result = polyval(p,z);
p1=[(0.9 + 0.001i) (0.2121 - 0.0008i) (0.10 -0.3i)];
f_of_1_over_z_result = polyval(p1,1./z);
figure();
subplot(2,2,1)
surf(re_z,im_z,abs(f_of_z_result),'EdgeColor','none')
title('|f(z)|')
xlabel('Z_R')
ylabel('Z_I')
% Zlabel('|f(z)|')
grid on
subplot(2,2,2)
surf(re_z,im_z,angle(f_of_z_result),'EdgeColor','none')
title('phase of f(z)')
xlabel('Z_R')
ylabel('Z_I')
subplot(2,2,3)
surf(re_z,im_z,abs(f_of_1_over_z_result),'EdgeColor','none')
title('|f(1/z)|')
xlabel('Z_R')
ylabel('Z_I')
subplot(2,2,4)
surf(re_z,im_z,angle(f_of_1_over_z_result),'EdgeColor','none')
title('phase of f(1/z)')
xlabel('Z_R')
ylabel('Z_I')
% Zlabel('phase of f(z)')
grid on
This code by Torsten (Thank you very much)
f = @(x,y) (0.3162).*exp(1i*((0.398)*pi))+((x+1i*y).*(0.4243).*exp(1i*((0.0013)*pi)) + (x+1i*y).^2*(0.9).*exp(-1i*(0.00035)*pi));
r = 0:0.01:0.9;
phi = 0:0.01:2*pi;
[R,PHI] = meshgrid(r,phi);
X = R.*cos(PHI);
Y = R.*sin(PHI);
F=f(X,Y);
figure
subplot(2,2,1)
surf(X,Y,abs(f(X,Y)),'EdgeColor','none')
view(2)
colorbar
title('|f(z)|')
xlabel('Z_R')
ylabel('Z_I')
% Zlabel('|f(z)|')
grid on
subplot(2,2,2)
surf(X,Y,angle(f(X,Y)),'EdgeColor','none')
view(2)
colorbar
title('phase of f(z)')
xlabel('Z_R')
ylabel('Z_I')
% Zlabel('|f(z)|')
grid on
subplot(2,2,3)
surf(X,Y,angle(f(X,Y)),'EdgeColor','none')
view(2)
colorbar
title('phase of f(z),view(2)')
xlabel('Z_R')
ylabel('Z_I')
% Zlabel('|f(z)|')
grid on
As we can see both codes work with |f(z)|, but not with the phase of the function.
I appriciate any help.
  2 件のコメント
Torsten
Torsten 2022 年 6 月 19 日
編集済み: Torsten 2022 年 6 月 19 日
Taking the phase of an even holomorphic function does not need to be continous.
I tried to explain it to you by the simple function f(z) = z, but you don't seem to have enough knowledge about complex analysis to understand my answer.
Read a book about complex analysis, e.g. Chapter 10 - 15 from
or in a more basic fashion
Jeffrey Clark
Jeffrey Clark 2022 年 8 月 7 日
@Aisha Mohamed, when looking at phase (angle) over some extent of a function it is visually easier to see relationships when unwrap is used to make it linear continuous: Shift phase angles - MATLAB unwrap (mathworks.com)

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

回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by