This Matlab code here is supposed to plot the values stored in the vector X and Y which are already filled by the user, the problem here is : when you click on complex and real poles, the plotting results the right points, while when entering only real poles, the output is weird. It's like the x-axis is on the y-axis, and I don't know what is exactly on the horizontal axis.
axis([-10,10,-10,10])
grid
[x,y] = ginput
subplot(2,2,1)
axis([-10,10,-10,10])
grid
subplot(2,2,2)
axis([-10,10,-10,10])
hold all
grid
x = round (x)
y = round (y)
if( y > 0.5 | y < 0.5)
r1 = x + i*y
r2 = conj(r1)
plot (r1,'*')
hold all
plot (r2,'*')
else
plot (x,y)
end
y = 0.5will never occur because youroundoff the values ofxandy. - mythealias