function plotCorrelation(n,mu);

global Demands Num

sum2=0;
for i=1:Num
    sum2=sum2+(Demands(n,i)-mu)^2;
end;
d=sum2/(Num-1);
disp(d);

for j=1:round(Num/50);
    sum3=0;
    for i=1:(Num-j)
        sum3=sum3+(Demands(n,i)-mu)*(Demands(n,i+j)-mu);
    end;
    k(j)=sum3/(Num-j);    
end;

for j=1:round(Num/50);
    p(j)=k(j)/d;
end;

figure;
j=1:length(p);
plot(j,p(j),'-ob');