% FEX35  A function used in Example 3.35.
%
% FEX35 A function used in Example3.35. 
%
function y=fex35(x,eta,theta)
n=size(x,1);
y=zeros(n,1);
for k=1:n
  y(k)=sqrt(1+.5*theta*x(k))/(exp(-eta)+exp(-x(k)));
%
% The preceding statement must be replaced by the following
% one if theta is "large", in order to account for the
% square root singularity near the origin.
%
%  y(k)=1/(exp(-eta)+exp(-x(k)));
%
end
