function [E] = VirtualniFce(obr1,obr2,lok_min,x)

% keyboard

ro = 1;
a = 1;

    fxx = TransPodobn(obr1,obr2,lok_min); % fx s hvezdickou
    fx = TransPodobn(obr1,obr2,x);
    Esub = log10(1/(1+exp(a-(fx-fxx))));
    Erep = -(3/4)*ro*(sum((x - lok_min).^(4/3)))*heaviside(fx-fxx);
    

    E = Esub + Erep;
    E = real(E);

