MATLAB: Does PLOT(0+0*i) place a point at (1, 0) in the complex plane in MATLAB 7.9 (R2009b)

alreadycomplexdataexistingholdMATLABon

When I run the following code
plot(2 + 2*i)
a point is placed at (2, 2) in the complex plane as expected. Now when I execute the following code to plot a point at (0, 0) in the same axes
hold on
plot(0+0*i)
a point is plotted at (1, 0) in the complex plane.

Best Answer

This is expected behavior for the PLOT function. The number 0+0*i is interpreted as a real number and hence PLOT(0+0*i) plots 0 versus the index of this value, which is at (1, 0), regardless of what is already plotted in the figure.
As a workaround, to plot a point at (0,0) in the complex plane:
plot(0 + eps * i, 'OR')