# where the jump of the phase function happen?

조회 수: 8 (최근 30일)
Aisha Mohamed 2022년 9월 6일
댓글: Aisha Mohamed 2023년 4월 10일
I know that (if Iam correct), phase(f(z)) =arctan(f(z)) ,(where f(z) is complex number ) is multivalued function, that means for example if arctan(f(z))= x, there is infinite number of angles (x) has the same tan value = the value f(z). So if we want to make arctan continuous we have to ristrect the rang of this function in this interval (-pi/2 pi/2). where z=x+iy
My questions are:
1- How can I determined the points where the jump happen? are they when the real part of complex number=0?(but phase =arcta(y/x)= arctan (y/0) =pi/2)
2-why when I plotted the phase of the function f(z) in this interval (-pi/2 pi/2) , I still have the same jump which appear as discontinuity of the phase of the function f(z)?
I use this code
re_z = -pi/2:0.01:pi/2;
im_z = -pi/2:0.01:pi/2;
[re_z,im_z] = meshgrid(re_z,im_z);
z = re_z + 1i*im_z;
f_of_z_result = polyval(p,z);
figure();
subplot(2,2,1)
surf(re_z,im_z,angle(f_of_z_result),'EdgeColor','none')
colorbar
title('phase(f_k(z))')
xlabel('Z_R')
ylabel('Z_I')
I appreciate any help
##### 댓글 수: 1이전 댓글 -1개 표시이전 댓글 -1개 숨기기
Star Strider 2022년 9월 6일

댓글을 달려면 로그인하십시오.

### 채택된 답변

Aisha Mohamed 2022년 9월 7일
Thanks Bruno
I know my a little information do not compare with expers like you and other experts in this group, but really I want to understad the worth information that you explane. Thank you so much. please allow me to ask more,
1- is this demi-line is the same for all second degree polynomail { y=0; x<=0, z=x+1i*y }?
2-please , what did you mean by your polynomial p(z) has two solutions of p(z)=x with x real and negative. ? I know second degree funtion has two root as a solution p(z)=0, but you mean p(z)=x with x real and negative. we have many values of z satisfay this condition not only two for example:
% -0.1320 - 0.0878i
% -0.1150 - 0.0756i
% -0.1067 - 0.0694i
2-if I have this polynomial (4th degree) p =[(0.6 - 0.7i) (-0.6000 + 0.0020i) (0.2449 + 0.0049i) (0.2000 + 0.0020i) (0.2 + 0.0010i) ] . is it has the same demi-line { y=0; x<=0, z=x+1i*y } and discontnue at four "places".
3 Becaufe of the discontinue at the negative values of x, can I avoied it by chosing this rang of z,
re_z = 0:0.01:pi/2;
im_z = 0:0.01:pi/2; and then I got this figure,
I appreciate any help.
##### 댓글 수: 10이전 댓글 8개 표시이전 댓글 8개 숨기기
Bruno Luong 2022년 9월 11일
편집: Bruno Luong 2022년 9월 11일
Correct statement:
angle(z) is discontinuous at { z : z real z <= 0}
For the second question: You again (for the 1000 times) confound the place of discontinuity of the angle(P(z)) and of angle(z).
Torsten 2022년 9월 11일
Because the phase(p(z)) at z=(0+0i) equales 2.1055 not +pi or -pi.
If you look at the plot of the "discontinuity front", you can see that z=0 is not therein. So angle(p(z)) is continuous at z = 0. Again: angle(p(z)), not angle(z).

댓글을 달려면 로그인하십시오.

### 추가 답변 (1개)

Bruno Luong 2022년 9월 6일
편집: Bruno Luong 2022년 9월 6일
angle(z) is discontinue at the half line { y=0; x<=0, z=x+1i*y }.
The phase jumps from -pi for imaginary part y < 0 to +pi for y > 0. To make thing more complicated for y=0 in IEEE754 it can take the "IEEE-sign" of either +1 or -1, and the angle(z) returns +/-pi depending of the IEEE-sign of y (which is 0 mathematically).
In your case you have to determine when polyval(p,z)* is real and negative, which will implies angle discontinuity.
(*) you didn't tell us what is p.
##### 댓글 수: 20이전 댓글 18개 표시이전 댓글 18개 숨기기
Torsten 2023년 4월 7일
편집: Torsten 2023년 4월 7일
You took the extreme case x = 0 for the two points you selected. If you restrict yourself to the values of z for which p(z) is real and < 0 instead of <= 0, it works out fine.
syms z x
p = (-0.1540 + 0.2600*1i)+ ( 0.4347 + 0.0914*1i)*z+( 0.7756 - 0.4566*1i)*z.^2;
assume(x,'real')
ps = p - x;
sol = solve(ps==0,z);
rsol1 = matlabFunction(real(sol(1)));
isol1 = matlabFunction(imag(sol(1)));
rsol2 = matlabFunction(real(sol(2)));
isol2 = matlabFunction(imag(sol(2)));
format long
x = 0;
z1 = rsol1(x) + 1i*isol1(x);
z2 = rsol2(x) + 1i*isol2(x);
double(angle(subs(p,z,z1)))
ans =
-1.265169150966033
double(angle(subs(p,z,z2)))
ans =
1.651667331151838
x = -1e-8;
z1 = rsol1(x) + 1i*isol1(x);
z2 = rsol2(x) + 1i*isol2(x);
disp(pi)
3.141592653589793
double(angle(subs(p,z,z1)))
ans =
-3.141592648089039
double(angle(subs(p,z,z2)))
ans =
3.141592641453825
Aisha Mohamed 2023년 4월 10일
Thanks, Torsten you are really genius.
I used only the values of z where f(z)=x and x<0 , it works out fine.

댓글을 달려면 로그인하십시오.

### 카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

### Community Treasure Hunt

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

Start Hunting!

Translated by