Noninvasive Fetal ECG: The PhysioNet/Computing in Cardiology Challenge 2013 1.0.0

function y = f( a, x )
% equivalent to std. tanh(), but faster

y = 2 ./ ( 1 + exp( x .* (-2) ) ) - 1;