Using ifft to Recover Cosine from Two Delta Impulses
Mostrar comentarios más antiguos
EDIT: *code removed*
The recovered cosine is different from the original one. The reocvered one is the absolute value of the original one. Where am I going wrong?
Respuesta aceptada
Más respuestas (1)
Star Strider
el 6 de Mzo. de 2015
One reason the recovered cosine is different from the original one is that it isn’t the original one:
x_2=cos(2*pi*(500+50*S)*t);
x=x_2+exp(-200*abs(t));
After taking the forward and reverse Fourier transforms, you’re comparing ‘x_2’ as your original signal, with ‘z’, a filtered version of ‘x’. If you plot both of these original signals, you will see that they are quite definitely not the same, so you wouldn’t expect their reconstructions to be the same.
The fftshift and ifftshift operations may also be causing problems. When I removed both, I got much more faithful reconstructions than I did with them included.
1 comentario
Pyro
el 6 de Mzo. de 2015
Categorías
Más información sobre Transforms en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!