Hi, I do not know what you really mean, but try to do the FT like this:

fftshift(fft(fftshift(cos(x))))

And check the phase.

Hello everybody,

>

>I have a problem in phase shift with Fourier transform: what I did is to create
a cosine function with known period, in example T@ and perform an FT on that
signal.

>

>FT give me correct period but phase is correct only if I perform FT on an
integer multiple data points, in example T@ and num.points 400 or any x*40.

>

>I get max phase shift (180�) with T/2, so in previous example performing FT
on 400 +(40/2) points.

>

>Is there anyone do know how can I get every time correct in phase no matter how
many points I do perform FT?

>

>Or does anybody knows if there are links, algorithms, codes that fix this
problem?

>

>Thanks in advance.

>Alberto

>