How to plot a complex function ?

Hello, I have a complex function like this f : z -> f(z) and I wonder how can I plot this because z is complex and f(z) as well. Any suggestions ? Thank you very much !

답변 (1개)

Star Strider
Star Strider 2017년 10월 17일

1 개 추천

It depends on what you want to do.
To plot the real and imaginary parts as a function of ‘z’:
plot(z, real(f(z)), z, imag(f(z)))
to plot the real and imaginary parts against each other:
plot(real(f(z)), imag(f(z)))

댓글 수: 2

abc abc
abc abc 2017년 10월 17일
Actually, I have complex data z (1+i, 5+6i,...) and complex data f(z) (8+9i, 5+4i,..) that I would like to plot
You did not say how you want to plot them.
Try this:
plot(real(z), real(f(z)), imag(z), imag(f(z)))
or some version of it to get the result you want.
You can also plot the absolute values (magnitudes) against each other with the abs function, and the phase angles with the angle function.
The possibilities are myriad, if not infinite.

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

카테고리

도움말 센터File Exchange에서 Scatter Plots에 대해 자세히 알아보기

질문:

2017년 10월 17일

댓글:

2017년 10월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by