|
On Oct 29, 9:05 am, "Monica Carlier" <carliermon...@gmail.com> wrote:
> Hi All
>
> I need to read a signal and modify it in the frequency domain, and then come back to the time domain and graph the new signal. I have problems because the signal is distorted and the graph is just a line. What could be the problem?
>
> This is the code I have:
> x=wavread('file.wav');
> y=fft(x);
> y1=abs(y);
> y2=unwrap(angle(y));
> y3=medfilt1(y1);
> y4=complex(y3,y2);
> y5=ifft(y4, 'symmetric');
> plot(y5);
>
> Please advise,
>
> Ceci
But you've converted the complex numbers y into amplitude and phase,
whereas complex wants real and imaginary parts.
Here is the first line of help complex:
COMPLEX Construct complex result from real and imaginary parts.
So, instead of using complex, you should convert using:
y4=y3.*exp(i*y2);
|