MATLAB Answers


I wonder how to plot complex function

Asked by Jae Yoon Kim on 24 Sep 2018
Latest activity Edited by Jae Yoon Kim on 5 Oct 2018
I want to know how to find and sketch the image of complex functions.


Sign in to comment.

1 Answer

Have a look at the following code:
f = @(z) 2/(z-1); %defining the function f
z = linspace(-10,10,1000); %1000 evenly spaced points between -10 and 10
z = z.*(z-2<1); % z-2<1

  1 Comment

Try something like this:
f = @(z) 2/(z-1); %defining the function f
z = linspace(1-i,3+i,10);
z = z.*(abs(z-2)<1) % z-2<1
f_val = arrayfun(f,z);

Sign in to comment.