autocorrelation of exponential and impulsive

Status
Not open for further replies.

radicalfunction

Newbie level 3
Joined
Nov 24, 2007
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,309
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),'-')
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…