function res = idos(x,sp)

l = length(sp);
s = 0;
spp = (sp(l))^(-1)*sp;

for k = 1:l
    s = s+ heaviside(x-spp(k));
end

res = l^(-1)*s;

end

