x=-100:100;
corrfg=zeros(size(x));
for i=1:size(x,2)
    u=(i-100);
    ux=x-u;
    f=exp(1-(x/30).^2)/exp(1);
    g=exp(1-(ux/10).^2)/exp(1);
    fg= f.*g;
    corrfg(i)=sum(fg);
    plot(x,f,x,g,x,f.*g,x,corrfg/8,'*')
    pause(.1)
end