Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

matlab code for autocorrelation function

Status
Not open for further replies.

afifar

Newbie level 5
Newbie level 5
Joined
Dec 7, 2012
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,327
i wanna ask about matlab code for autocorrelation function.

if an input is wide-sense stasioner with autocorrelation function is RXX(t)=10e^(-2|t|).

what is matlab code for that function ?
 

If you are asking the code to compute that Rxx(t) function it is very easy to do that in Matlab:

Code:
% Define range of t in the interval [-1;1] with steps of 0.01
t = [-1:.01:1];
% Compute the function with input vector t (with absolute values)
R = 10 * exp(-2 * abs(t));
 

If you are asking the code to compute that Rxx(t) function it is very easy to do that in Matlab:

Code:
% Define range of t in the interval [-1;1] with steps of 0.01
t = [-1:.01:1];
% Compute the function with input vector t (with absolute values)
R = 10 * exp(-2 * abs(t));


Is that all ? how can i decide the mean of output ?
 
Last edited:

Yes, that's all! This is Matlab ;-)

To get the average of a vector (in this case R), just use the following built-in function

Code:
avg = mean(R);
 
  • Like
Reactions: afifar

    afifar

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top