Re: Frequency domain representation of time domain signal(Ma
hi,
thank you for attention,
I've written a code for FFT with data window. magnitude of response is very high.
I've attached my code . Please you find my mistake.
my signal is a non-stationary waves.
clc
Fs = 1e8;
fftLength = 5000;
% Calculates windowed FFT (length fftlen, with 50% overlap),
% then inverse FFT with overlap-add. If no processing is inserted
% into the function below, the output should be essentially identical
% to the input.
in=in
);
% Create output buffer for overlap add
xx=zeros(1,length(in));
% Create length “fftlen” raised cosine window function
wind=0.5*(1-cos(2*pi*(0:fftLength-1)/fftLength));
for i=1:fftLength/2
length(in)-fftLength)
ff=fft(wind.*in(i
i+fftLength-1))',fftLength);
z=abs(ff);
xx(i
i+fftLength-1))= xx(i
i+fftLength-1))+ ifft(ff,fftLength);
end
figure
semilogx([0:fftLength-1]*Fs/fftLength,abs(ff))
figure
plot(xx)