Hi,
i want to plot the autocorrelation with gaussain ,exponential and impulsive functions as sources ,
all the autocorrelations should start at one and goes to zero
so i did like this
N=10000;
t1 = randn(1,N);
autocorr1 = xcorr(t1,20)/N;
%%%%%%%%%%%%%%
t2 = exprnd(1,1,N);
autocorr2 = xcorr(t2,20); %here if i change xcorr to xcov ,i get exactly what i want .what is the wrong with xcorr function
autocorr2 = autocorr2/autocorr2(21);
%%%%%%%%%%%%%%%%
t3 = %???? what matlab function i use for impulsive
figure,plot([0:20],autocorr1(21:41),':',[0:20],autocorr2(21:41),'-')