MATLAB: Ifft

digital signal processing

I want to distort the phase of the frequency spectrum of a signal and not the magnitude. After that I want to find out the ifft considering both magnitude and the new phase. Usually I consider the function as a whole (complex function x) and find ifft(x). But I don't know how to find ifft of mag(x) and a*phase(x) (where 'a' is any constant).How would I do that?

Best Answer

Let's assume that the signal is x. So what you could do is
Xf = fft(x);
Xf_mag = abs(Xf);
Xf_phase = angle(Xf);
% do whatever you need to the phase and save to Xf_phase_new
Xf_new = Xf_mag.*exp(1i*Xf_phase_new);
x_new = ifft(Xf_new);
HTH