function H0=add_H_tilde0(regulator_parameters,H_tilde,k)
index=decompose_index(k,regulator_parameters.n_grid,regulator_parameters.dim);

H0=zeros(size(regulator_parameters.H_tilde_on));
a=0;
for i=1:(size(regulator_parameters.H_tilde_on,1))
    for j=1:(size(regulator_parameters.H_tilde_on,2))
        if (regulator_parameters.H_tilde_on(i,j))
            a=a+1;
            H0(i,j)=H_tilde(a,index(a));
        end
    end
end

end