clear all;
close all;

tot=20;

dx=zeros(tot);
norm=zeros(tot);
dx(1)=1.;
for i=1:tot
    if i>1
        dx(i)=dx(i-1)/2.;
    end
    x=1:dx(i):10;
    norm(i)=sum(sqrt(sin(x).^2))/length(x);
end

semilogx(dx,norm,'-o');
