% My version of the IRI95 FORTRAN function EPTR.FOR
%

function ep=eptr(x,sc,hx)

argmax=88;                                              %maximum argument
dl=(x-hx)./sc;
ep=zeros(size(x));                                      %results matrix                              
ep(abs(dl)<argmax)=log(1+exp(dl(abs(dl)<argmax)));
ep(dl>argmax)=dl(dl>argmax);


