fft of signal and ifft of result not consistent?

2 views (last 30 days)
I have been attempting to use the fft command to draw the phase data of a pulse before multiplying that phase angle by a constant and creating another fourier data set to inverse fourier back to the original shape in a different space of time.
In order to do this I have created a padded pulse file using:
x=[-pi:2*pi/4999:pi];
t=sin(x).*exp(-(x.^2));
t=horzcat(zeros(1,1000),t,(zeros(1,10000)));
I then created the fourier data and extracted the phase values:
f=fft(t);
p=unwrap(angle(f));
I then created a new time data set for the pulse using ifft and a modified value of p:
p2=1.1.*p;
f2=abs(f).*exp(i.*p2);
t2=ifft(f2);
When plotting t2 on the same graph as t, the waveforms should be of the same shape but shifted along in the time axis. Instead, the second waveform has been changed such that it's frequency data is still similar but the shape in the time domain is different.
I have tried this same technique in igor pro and have had positive results but was hoping to be able to use MatLab for the entirety of my data analysis.
Can anybody see an error in my working?

Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!