function H=tanh_taper(npts) % Function TANH_TAPER % % computes a smooooooth taper verifying : % - H(1) = 0 % - H(npts) = 1 (almost) % based on the functional form of the hyperbolic tangent % % inputs : number of points (npts) % JEG, Jan 2005 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% t=linspace(0,1,npts); H=(1+tanh((t-.5)*2*pi))/2; % note, the 2*pi constant is here for the fun. Between 3 and 3.5 works well