function H = steadygrow(params, z_ss)
%params = [sigma alpha r beta psi delta rho g M];

h = zeros(params(9),1);
s1 = zeros(params(9),1);
s2 = zeros(params(9),1);

for i = 1:params(9)
    s1(i) = (1-normcdf(z_ss(i)-params(1)))*(params(4)*(1-params(6)))^(i-1)*(1+params(8))^(-i);
    s2(i) = (1-normcdf(z_ss(i)))*(params(4)*(1-params(6)))^(i-1);
end 
S1 = sum(s1);
S2 = sum(s2);

for j = 1:params(9)
    h(j) = z_ss(j) - 1/params(1)*( log(1-params(2)) + log( S1) - log(S2) +1/2*params(1)^2 + j * log(1+params(8)));
end 
    H = h;

end 
