why the figure of cos function does not symmetric around y axis?

2 visualizaciones (últimos 30 días)
Aisha Mohamed
Aisha Mohamed el 29 de Ag. de 2022
Editada: Torsten el 30 de Ag. de 2022
I am tring to describe the figurs of these function .
fk(z) = (0.1000 + 0.3000i) + (0.4243 + 0.0017i)z + (0.9000- 0.0010i)z2
fb(z) = (0.1000 0.3000i)z1 + (0.2121 0.0008i)z2 + (0.9000 +0.0010i)z3
but from the following figurs I faced many question:
1- Why cos(phase(f_k(z))) and cos(phase(f_b(1/z))) not symetric around the y axis?
2 - why there is overlab between the positiv and negative values of cos(phase(f_b(1/z))) in the origin?
3- what is the best points I have to describe them to cover these figures?
I will appriciate any help
  4 comentarios
Aisha Mohamed
Aisha Mohamed el 29 de Ag. de 2022
Editada: Cris LaPierre el 30 de Ag. de 2022
Hi all and Thank you very much.
As Torsten asked, I used this code to get the plot both of cos(angle(f_k(z))) and cos(angle(f_b(1/z)))
p=[ ( 0.9000 - 0.0010i) (0.4243 + 0.0017i) (0.1000 + 0.3000i) ];
p1=[(0.9000 + 0.0010i) (0.2121 - 0.0008i) (0.1000 - 0.3000i) (0)] ;
re_z = -6.005:.01:6.005;
im_z= -6.005:.01:6.005;
[re_z,im_z] = meshgrid(re_z,im_z);
z = re_z + 1i*im_z;
f_of_z_result = polyval(p,z);
f_of_1_over_z_result = polyval(p1,1./z);
figure();
subplot(2,2,2)
surf(re_z,im_z,cos(angle(f_of_z_result)),'EdgeColor','none')
colorbar
title('cos(phase of f_k(z))')
xlabel('Z_R')
ylabel('Z_I')
zlim([-5 5]) %adjust this value as needed
caxis([-1 1]) %adjust this value as needed
subplot(2,2,4)
surf(re_z,im_z, cos(angle(f_of_1_over_z_result)),'EdgeColor','none')
colorbar
title(('phase of f(1/z)'))
title(('cos(phase of f_b(1/z))'))
xlabel('Z_R')
ylabel('Z_I')
caxis([-1 1]) %adjust this value as needed
zlim([-1 1]) %adjust this value as needed
grid on
Is this wrong?
and as we know the cos figure is symmetric around y axis, why these figures do not?
I appreciate any help
Aisha Mohamed
Aisha Mohamed el 30 de Ag. de 2022
When I plot these figures in plane I got the previous figures.
Is this wrong?
and as we know the cos figure is symmetric around y axis, why these figures do not?
I appreciate any help

Iniciar sesión para comentar.

Respuestas (1)

Chunru
Chunru el 30 de Ag. de 2022
p=[ ( 0.9000 - 0.0010i) (0.4243 + 0.0017i) (0.1000 + 0.3000i) ];
p1=[(0.9000 + 0.0010i) (0.2121 - 0.0008i) (0.1000 - 0.3000i) (0)] ;
re_z = -6.005:.01:6.005;
im_z= -6.005:.01:6.005;
[re_z,im_z] = meshgrid(re_z,im_z);
figure
z = re_z + 1i*im_z;
f_of_z_result = polyval(p,z);
f_of_1_over_z_result = polyval(p1,1./z);
figure();
subplot(1,2,1)
surf(re_z,im_z,cos(angle(f_of_z_result)),'EdgeColor','none')
colorbar
title('cos(phase of f_k(z))')
xlabel('Z_R')
ylabel('Z_I')
zlim([-5 5]) %adjust this value as needed
caxis([-1 1]) %adjust this value as needed
view(2);
axis tight
subplot(1,2,2)
surf(re_z,im_z, cos(angle(f_of_1_over_z_result)),'EdgeColor','none')
colorbar
title(('phase of f(1/z)'))
title(('cos(phase of f_b(1/z))'))
xlabel('Z_R')
ylabel('Z_I')
caxis([-1 1]) %adjust this value as needed
zlim([-1 1]) %adjust this value as needed
grid on
axis tight
view(2);
1- Why cos(phase(f_k(z))) and cos(phase(f_b(1/z))) not symetric around the y axis?
==> It is a general polynomial and cos(angle(f_x(x+iy))) is in general not equals to cos(angle(f_x(-x+iy))
2 - why there is overlab between the positiv and negative values of cos(phase(f_b(1/z))) in the origin?
==> What do you mean overlap? This is quite a general polynomial and it may not be straightforward to explain how the very nonlinear function cos(phase(f_b(1/z))) behavors.
3- what is the best points I have to describe them to cover these figures?
==> Without criteria given, it is not possible to tell what is the best.
  3 comentarios
Aisha Mohamed
Aisha Mohamed el 30 de Ag. de 2022
Thank you Torsten. I find this code is logical and right to me. And I also find the following code from other MATLAB expert logical and right.
This is the other code,
% define the function f(z) in terms of its coefficients p:
% f(z) = z^2-2*z+1
p = [1 -2 1]; % polynomial coefficients p instead of anonymous function f
% evaluate f over all z in ([-1,1],[-1,1]):
f_of_z_result = polyval(p,z);
% evaluate f at 1/z:
f_of_1_over_z_result = polyval(p,1./z);
% plot the magnitude and phase of f(z) and f(1/z):
% (same as before)
figure();
subplot(2,2,1)
surf(re_z,im_z,abs(f_of_z_result),'EdgeColor','none')
title('|f(z)|')
subplot(2,2,2)
surf(re_z,im_z,angle(f_of_z_result),'EdgeColor','none')
title('phase of f(z)')
subplot(2,2,3)
surf(re_z,im_z,abs(f_of_1_over_z_result),'EdgeColor','none')
title('|f(1/z)|')
subplot(2,2,4)
surf(re_z,im_z,angle(f_of_1_over_z_result),'EdgeColor','none')
title('phase of f(1/z)')
I know you are experts and you know what you do, but I am still confuse which code I can use , specially I see some difference in the plot of $ cos(angle(f_b(1/z)) $ between these cods
May be there are some points are different in the two cods , and I could not recognize them
Could you please help me to get thesutible code from them to plot f(z) and f(1/z)?
I will appreciate any help.
Torsten
Torsten el 30 de Ag. de 2022
Editada: Torsten el 30 de Ag. de 2022
Yes, as I suspected: you wrote something, but meant something else.
If you want to plot what is shown in your original graphics for cos(angle(fb(1/z))), you must define fb as
fb(z) = (0.1000 0.3000i)*z + (0.2121 0.0008i)*z^2+ (0.9000 +0.0010i)*z^3,
not as
fb(z) = (0.1000 0.3000i)z1 + (0.2121 0.0008i)z2 + (0.9000 +0.0010i)z3
It's up to you to decide which of the definitions is correct. Depending on your decision, you get different plots.

Iniciar sesión para comentar.

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by