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*}

조회 수: 1 (최근 30일)
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
Torsten
Torsten 2022년 6월 18일
It's you who made the "hole" by choosing
r = 0.2:0.01:0.9;
instead of
r = 0:0.01:0.9;

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by