问题 I need to plot a complex function with phase information in MATLAB. To do this I have ploted a surf plot with x,y representing real and imaginary, the height representing the magnitude and colour depending on the phase, as shown below for the example of log(x): xmin=-5; xmax=5; dx=0.1; xReal = xmin:dx:xmax; xImaginary = xmin:dx:xmax; [x,y] = meshgrid(xReal, xImaginary); s = x + 1i*y; z=log(s); magnitude = abs(z1); Phase = angle(z); figure; h(1) = surf(x,y,magnitude,Phase,'EdgeColor','none');