Complex number troubles with numpy

When you specify the array x and X you need to make sure it is of complex data type, i.e:

x = zeros((4),dtype=complex)

EDIT:

To fix the plot you need to plot both real and imaginary parts:

plt.plot(X.real,X.imag)
plt.plot(fx.real,fx.imag, 'ro')

This gives me:

….which looks like your Matlab graph.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)