why the fft in scipy can't give the same result as the fft from matlab

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

why the fft in scipy can't give the same result as the fft from matlab

zhang chi
hi
ys = randn(64)
Yf = fftpack.fft(ys,128)

why Yf.shape=64,128?

but in matlab the size is 128 X1 ,
Yf = fft(ys,128)

_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: why the fft in scipy can't give the same result as the fft from matlab

Robert Kern-2
On Thu, May 15, 2008 at 12:20 PM, zhang chi <[hidden email]> wrote:
> hi
> ys = randn(64)
> Yf = fftpack.fft(ys,128)
>
> why Yf.shape=64,128?

In [1]: from numpy import *

In [2]: from scipy import fftpack

In [3]: ys = random.rand(64)

In [4]: Yf = fftpack.fft(ys, 128)

In [5]: Yf.shape
Out[5]: (128,)


Can you show us a complete piece of code with its output that
demonstrates the behavior that you are seeing? What versions of numpy
and scipy are you using?

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco
_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user