How to plot a complex function ?
47 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 !
0 comentarios
Respuestas (1)
Star Strider
el 17 de Oct. de 2017
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 comentarios
Star Strider
el 17 de Oct. de 2017
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.
Ver también
Categorías
Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!