Suppose there is a real signal Amp_time
(Amplitude as a function of time) at Sample Rate SampRate
.
I can transform it into frequency domain with
fftLength = length(Amp_time);
FT_freq = fft(Amp_time,fftLength); % signal as a function of frequency
FT_freq = FT_freq(1:fftLength/2); % throw away symmetric part
and the corresponding frequencies:
freq = [0:fftLength-1].*(SampRate/fftLength);
freq = freq(freq < SampRate/2); % throw away symmetric part
To transform it back into time domain I simply use
Amp_time2 = ifft(FT_freq,'symmetric');
Question
But how about if I am changing the length of FT_freq?
Suppose I want to reduce length(FT_freq)
by averaging FT_freq
to a coarser frequency vector (i.e. 10^3 instead of 10^5 frequencies).
[freq2,FT_freq2] = special_average(freq,FT_freq) % reducing length of FT_freq
I don't think that it is possible to take the version above (because how can Matlab possibly know to which frequency the signal is corresponding now).
What am I missing?
Do I have to scale the coarse FT_freq2
up again in order to get the right IFFT?
(bad in terms of memory, ...)
The reason I wanted to reduce the degrees of freedom of the Fourier Transform is to avoid having matrices with size of order 10^5 x 10^3
(FFTing every tenth of a second of some song) and thereafter to compare freq-spectra/tones.