1. An apparatus for generating a weight function, comprising: a first transformer circuit for transforming a weight function in time domain into a weight function in frequency domain before using the weight function; a multiplier circuit connected to the first transformer for multiplying the weight function in the frequency domain by a window function originally generated in the frequency domain, wherein the window function is any one of a Hanning window, a Gaussian window and a Blackman-Harris window; and a second transformer circuit connected to the multiplier for transforming the multiplied weight function in the frequency domain to the time domain.