why we find discontinuity when we plot this analytic function \begin{align*} f(z) =(0.5+000i)+(0.5000 + 0.8660i) z+(-0.2500+0.4330i)z^2 \end{align*}

I used the code which is provided by TORSTEN(Thank you so much) to plot this function:
$ f(z) =(0.5+000i)+(0.5000 + 0.8660i) z+(-0.2500+0.4330i)z^2 $ .I write this function in polar cordinate as follows
f = @(x,y) 1*( 0.5.*exp(1i*0)+((x+1i*y).^1*exp(1i*pi/3))+(0.5)*(x+1i*y).^2*exp(1i*-pi/3)) .But the figer is discontinuty as yo can see :
I used this code
clc
close all
clear all
f = @(x,y) (0.5)+((x+1i*y).*exp(1i*pi/3))+(0.5)*(x+1i*y).^2*exp(-1i*pi/3);
r = 0.2: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')
grid on
I think there is some mistake inmy writing of the function f, because this code work perfictly with other function like
f = @(x,y) 0.5./(x+1i*y).^3.*((x+1i*y).^3-exp(1i*pi/3))./((x+1i*y)-exp(-1i*pi/3)).
Could you please help me to correct my mistake?
I appriciate any help

5 Comments

Updated: The ozone hole is closed now... Thanks to @Torsten 😃
% f = @(x, y) (0.5)+((x+1i*y).*exp(1i*pi/3))+(0.5)*(x+1i*y).^2*exp(-1i*pi/3);
f = @(x, z) (0.5 + 000i) + (0.5 + 0.8660i)*z + (-0.2500 + 0.4330i)*z.^2;
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'), 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'), 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'), grid on
Do you see the problem ?
Note that there is no holomorphic branch of log(z) on |z| <= 1, e.g.
f = @(x,y) x+1i*y;
r = 0:0.01:1;
phi = 0:0.01:2*pi;
[R,PHI] = meshgrid(r,phi);
X = R.*cos(PHI);
Y = R.*sin(PHI);
surf(X,Y,angle(f(X,Y)),'EdgeColor','none')
view(2)
colorbar
title('phase of f(z)')
Hi sam
The mistake here that the function f(z) =(0.5+000i)+(0.5000 + 0.8660i) z+(-0.2500+0.4330i)z^2 is analytic function, so the figure of this function must be continuse without any holes. why we find hole in these graphs?. I think the way that was used to write this function in the above code is wrong.
So my question how can I plot this function correctly f(z) =(0.5+000i)+(0.5000 + 0.8660i) z+(-0.2500+0.4330i)z^2
to find the phase and |f| in Matlab?
Thank you
It's you who made the "hole" by choosing
r = 0.2:0.01:0.9;
instead of
r = 0:0.01:0.9;

Sign in to comment.

Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Asked:

on 18 Jun 2022

Commented:

on 19 Jun 2022

Community Treasure Hunt

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

Start Hunting!