function y = wavewin(x,T,a) % WAVEWIN - Wavelet function window % % The command y=wavewin(x,T,a) windows the data in a % single vector x. T is the offset, and a is the scale % factor which can be roughly thought of as frequency. % The wavelet function used is % % 1 -(t˛/2) % gamma(t) := -------·(1 - t˛)·e % (2pi)^˝ % % The function x(t) is then multiplied: % y(t) = x(t)·gamma[(t-T)/a] % % SEE ALSO wavelet x=x(:)'; n=length(x); t=0:1:n-1; gamma=1/(2*pi)^.5*(ones(1,n)-((t-T)/a).^2).*exp(-.5*((t-T)/a).^2); y=gamma.*x;