function [y] = sfun(x,alpha)
%  Find s(x,alpha), for a column vector x

n=length(x);
y =zeros(n,1);
for i=1:n
	if(x(i)>0.0)
		y(i)=1.0/(1+exp(-alpha*x(i)));
	else
		y(i)=exp(alpha*x(i))/(1+exp(alpha*x(i)));
	end;
end;

return;
