function f = makeChap(x, parameters, deg)


alt0 = parameters.a;
n0 = parameters.n;
h = parameters.h;
f = [];
n = prod(size(x));

    n_e = nan(1,n);
    z = zeros(1,n);
    l = n_e;
    y = n_e;
    g = n_e;
    ang = deg2rad(deg);
    
    for j = 1:n
        z(j) = x(j)-alt0;
        l(j) = (0.5/cos(ang))*exp(-z(j)/h);
        y(j) = (0.5-(0.5*(z(j)/h))-l(j));
        n_e(j) = n0*exp(y(j));
    end
    f = n_e;


end