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

Click For Summary
SUMMARY

The discussion focuses on implementing the autocorrelation function for the signal u(n) defined as u(n) = 0.4s(n) + 0.7s(n) - 0.1s(n-2) + v(n) in MATLAB. The autocorrelation values calculated are r(0) = 0.663, r(1) = 0.21, and r(2) = -0.04, with all other values being zero. The user seeks guidance on coding u(n) in MATLAB to utilize the built-in 'xcorr' function and how to represent the noise term v(n) to ensure it remains uncorrelated with s(n).

PREREQUISITES
  • Understanding of MATLAB programming and syntax
  • Knowledge of autocorrelation and its mathematical formulation
  • Familiarity with signal processing concepts, particularly uncorrelated noise
  • Experience with MATLAB functions, specifically 'xcorr'
NEXT STEPS
  • Research MATLAB syntax for defining and manipulating discrete-time signals
  • Learn how to implement the 'xcorr' function in MATLAB for autocorrelation analysis
  • Explore methods to generate uncorrelated noise in MATLAB, such as using 'randn'
  • Study the implications of signal correlation in signal processing applications
USEFUL FOR

This discussion is beneficial for students and professionals in signal processing, MATLAB programmers, and anyone involved in analyzing autocorrelation of signals in MATLAB.

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?
 
Physics news 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
2K
  • · 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
6K
Replies
3
Views
3K
Replies
5
Views
2K
Replies
3
Views
2K