Incorrect 3d graph of Complex Function (with Singular Matrix Error)
Ältere Kommentare anzeigen
Hi,
I need to plot complex functions with x and y representing real and imaginary parts of the number, the z axis representing the value of my function.
I am using surfc for this but end up getting an obscure graph, along with the warning: matrix is close to singular or badly scaled.
The method I am using works perfectly for something simple like just plotting abs(z) but not for (e^z)/(z-2).
How can I resolve this?
My code is attached below. (I am using matlab online)
Any help would be greatly appreciated. Thanks in advance!
a = -500:10:500;
b = -500:10:500;
[A,B] = meshgrid(a,b);
z = A + 1i*B;
f = (exp(z))/(z-2)
surfc(a,b,abs(f))
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu 2-D and 3-D Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
