How to plot a function with complex variables?

조회 수: 20 (최근 30일)
Jullienne Franz
Jullienne Franz 2018년 6월 27일
편집: dpb 2020년 6월 25일
Hello guys, how do I plot a function with complex variables? For instance, I want to plot a function shown in attached file for |z|<1.
Thanks!

채택된 답변

Star Strider
Star Strider 2018년 6월 27일
I am not certain from your description what you want to plot.
Try this:
ang = 0:0.1:2*pi;
z = exp(1i*ang);
f = @(z) 1./z;
figure
plot(real(f(z)), imag(f(z)))
axis equal
figure
plot(ang, real(z))
hold on
plot(ang, imag(z))
hold off
grid
The first figure plots the imaginary component as a function of the real component. The second plots both as a function of ‘ang’.

추가 답변 (1개)

Mark Saad
Mark Saad 2018년 6월 27일
편집: dpb 2020년 6월 25일
  댓글 수: 1
Jullienne Franz
Jullienne Franz 2018년 6월 27일
Thank you for your sugestion, but I can't seem to follow how to do that in my case. To simplify my question, how do I plot the function, say f(z)=1/z for |z|<1, where z is a complex number.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by