I am using the following code in Matlab, from some source (sadly I cant remember).
The code is used for smoothing signals using a low pas filter.
function y = fftSmooth(resp,srateCorrectedSmoothedWindow) L = length(resp); window = zeros(1,L); window(floor((L-srateCorrectedSmoothedWindow+1)/2)... :floor((L+srateCorrectedSmoothedWindow)/2))=1; % zero phase low pass filtering tmp = ifft(fft(resp).*fft(window)/srateCorrectedSmoothedWindow); y=-1*ifft(fft(-1*tmp).*fft(window)/srateCorrectedSmoothedWindow); I have removed some unnecessary parts to shorten the code.
My question: how exactly is the filter designed (the last two lines)? Shouldn't it be in the time domain?
