function plotAVG(ARG,nMin,nMax)

[m,n]=size(ARG);
if m==1
    X=ARG(1,nMin:nMax);
else
    X=ARG(nMin:nMax,1);
    X=X';
end
avg=sum(X)/(nMax-nMin+1);
X=[nMin:nMax];
Y=zeros(1,nMax-nMin+1);
Y(1,1:nMax-nMin+1)=avg;
hold on;
plot(X,Y,'r--');
hold off;