Plotting a complex exponential, exp(i*x), in 3D?
Show older comments
Hi, I try to plot the complex exponential, exp(i*x), in 3D. As in https://qph.is.quoracdn.net/main-qimg-b7ac15119bfa0a4840084c98da915ed8?convert_to_webp=true. Using plot or fplot, I got the warning "Imaginary parts of complex X and/or Y arguments ignored" and with ezplot: "This function has no real values".
Any suggestions on how to make such a plot in Matlab?
Thanks, Steven
Accepted Answer
More Answers (1)
Steven Lord
on 15 Jan 2016
x = 0:0.1:10;
yz = exp(1i*x);
plot3(x, real(yz), imag(yz))
ylabel('\Re(e^{1i*x})');
zlabel('\Im(e^{1i*x})');
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
