The problem of autocorrelation function

4 vues (au cours des 30 derniers jours)
wenxin liu
wenxin liu le 5 Sep 2021
Commenté : wenxin liu le 6 Sep 2021
According to a differential equation in matlab, the time series x(t) is obtained. To obtain the autocorrelation result of the following figure, xs(t)=x(t-s), s is also a variable, how to write a program in matlab.

Réponses (1)

Image Analyst
Image Analyst le 5 Sep 2021
Isn't it just
autoCorrelation = xcorr(x, x);
but that seems so obvious so I'm wondering if this is your homework problem and you have to not use the MATLAB function and write your own version of it. If so, read the following link:
If it's not homework, xcorr() should work for you.
  5 commentaires
wenxin liu
wenxin liu le 6 Sep 2021
Sorry, please forgive my mistake.
Here are my steps:
Step 1: I solve the differential equations (1,2) through ode45(), and get E(t),N(t)
Step 2: Let x(t)=E(t); then perform equation 3.xcorr(x(t),x(t-s)).
But s is also a variable with scope, it belongs to (0,5e-9). So I don't know what to do.
wenxin liu
wenxin liu le 6 Sep 2021

Connectez-vous pour commenter.

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by