
function [kh_z] = kh_z2 (z)

zsol = 0.16;
lsol = 0.065;
S = 0.32;
N = 35;
k0 = 100;

for jj = 0:1:N
    pha1 = mystep2 (z - (zsol + jj*S - lsol/2));
    pha2 = mystep2 (zsol + jj*S +lsol/2 - z);
    HE (jj+1, :) = pha1 + pha2 -1;
end

HE = sum(HE);
kh_z = k0*HE';