function rizeni=interpol(beta,H,C,H_tilde_on)
for
pom=H-beta(4,5);
if (pom(1)>0)
    rizeni=C(1);
else
    if (pom(end)<0 || pom(end)==0)
        rizeni=C(end)*2^pom(end);
    else
        for i=2:size(H,2)
            if (pom(i)>0)
                delka=H(i)-H(i-1);
                rizeni=(1+pom(i-1)/delka)*C(i-1)+(1-pom(i)/delka)*C(i);
                break               
            end            
        end
    end
end

end