function sp = spacing(x, a, b, e_g0, u_g0) sp = b*atanh(2/(e_g0)*(x-u_g0)-1)-a; end