In matlab how do I write u(n) in order to get the autocorrelation?

nikki92
Messages
37
Reaction score
0

Homework Statement



u(n) = .4s(n)+.7s(n) -.1s(n-2)+v(n) where v(n) is zero mean and has variance 0.003 and uncorrelated with s(n)

I want the autocorrelation is E[u(n-k)u(n)] I can solve it easily by hand which is the follow
so r(k) = 0.663 for k =0, 0.21 for k=1 , -0.04 for k=2 and the rest are zeros.

The Attempt at a Solution


In MATLAB how do I write u(n) in order to get the autocorrelation?
 
on Phys.org
Did you try the built in MATLAB function 'XCorr' ?
 
I am not having trouble getting a function for auto-correlation, I am just not sure how to code u(n) in a way to input it into xcorr, also how would I represent v(n) in a way so it remains uncorrelated with s(n).
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 29 ·
Replies
29
Views
8K
Replies
3
Views
3K
Replies
5
Views
3K
Replies
3
Views
2K