Sign in

username:

password:



Not a member?

Search matlab



Search tips

Subscribe to matlab



matlab by Keywords

Atanh | Autocorrelation | Bandpass Filter | C++ | Conv | Database | Deconv | Excel | FFT | Filter | Filtering | FIR | Fourier Transfrom | FSK | Gaussian Noise | Haykin | IFFT | Image | Java | LFSR | LMS | LPC | MEX | OFDM | QPSK | Radix | Random | Sampling | Segmentation | Simulink | Visual Basic | Waveform | Wavelet

Sponsor

NEW! TMS320C6474: 3x the performance. 1/3 the cost. Three 1 GHz cores on 1 chip.

Discussion Groups

Discussion Groups | Matlab DSP | Why this particular code doesnt work?

Technical discussion about Matlab and issues related to Digital Signal Processing.

  

Post a new Thread

Why this particular code doesnt work? - Sreeram - Feb 28 7:25:00 2006



sig=wavread('path to signal file');
reconstructed_sig=ifft(fft(sig));
subplot(2,1,sig);
plot(sig);
subplot(2,2.reconstructed_sig);
plot(reconstructed_sig);
	i know that to analyse the fft of sig, the magnitude and phase spectra 
of it must be found.But why is the ifft-fft combination not working?
What must i do so that i can reconstruct the original sig using ifft?

Thanx in advance
warrier
	


(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )

Re: Why this particular code doesnt work? - arkkimede - Feb 28 12:14:00 2006

Please, look at the following link
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=5654&objectType=fi
le
Here you can find ad example of what you are looking for
Bye

2006/2/28, Sreeram <warrier_is@warr...>:
>
> sig=wavread('path to signal file');
> reconstructed_sig=ifft(fft(sig));
> subplot(2,1,sig);
> plot(sig);
> subplot(2,2.reconstructed_sig);
> plot(reconstructed_sig);
>
>
> i know that to analyse the fft of sig, the magnitude and phase spectra
> of it must be found.But why is the ifft-fft combination not working?
> What must i do so that i can reconstruct the original sig using ifft?
>
> Thanx in advance
> warrier
>
	


(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )

Re: Why this particular code doesnt work? - Amit Pathania - Feb 28 14:12:00 2006

syntactically the subplot statements should be 
  subplot(2,1,1); plot(1);
  subplot(2,1,2); plot(2);
  i ran your code with a random .wav file with the above plotting statements and it works ..
there might be some distortion because of .wav clipping

Sreeram <warrier_is@warr...> wrote: 
  sig=wavread('path to signal file');
reconstructed_sig=ifft(fft(sig));
subplot(2,1,sig);
plot(sig);
subplot(2,2.reconstructed_sig);
plot(reconstructed_sig);
	i know that to analyse the fft of sig, the magnitude and phase spectra 
of it must be found.But why is the ifft-fft combination not working?
What must i do so that i can reconstruct the original sig using ifft?

Thanx in advance
warrier
	


(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )