I have a truncated data set that I need to transform, for example:
x=linspace(0,5,256); y=cos(pi*x).*exp(-x.^2/8); tr=(tanh(linspace(-20,100,numel(x)))+1)/2; plot(x,y.*tr)
N=2^9; df=1/(N*dq/sqrt(2)); fvec=(0:df:df*(N-1)); h=window(@hamming,numel(x))'; f=idct(y,N); f_truncated=idct(y.*tr,N); f_truncated_hamming=idct(y.*tr.*h,N); plot(fvec,f,fvec,f_truncated,fvec,f_truncated_hamming); xlim([0 10]);
adds the expected ringing artifact. My problem is the nearest side lobes .. I tried adding a window filter such as hamming etc, but I still have this ringing artifacts. Any advice will be appreciated...