FFT of wave packet, strange phase behaviour
3 views (last 30 days)
Show older comments
Hi,
I'm computing the fft of a wave packet (centred at t= 0, odd number of entries!) to determine its frequency and phase. For this example I created a packet with a frequency of 10Hz and a phase of 1*pi. Waveform plot:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/151900/image.jpeg)
When plotting the fft results I can easily spot the frequency but two things bewilder me:
- The phase results of the fft jumps continuously between 2*pi and -2*pi.
- The amplitude also jumps between 0 and positive values. I would expect a lorentz peak centred at my frequency and continuously going down with its width being a measurement for the decay time of the waveform.
Anyone have an explanation for these two things? Is there an error in my code?
Y3 = fftshift(fft(ifftshift(waveform)));
subplot(121);
plot(fVals, abs(Y3));
subplot(122);
plot(fVals, angle(Y3));
Thanks in advance!
Fourier Transform Left side is the absolute value of the fourier transform. Right side is the angle.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/151902/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/151905/image.jpeg)
0 Comments
Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!