Filter löschen
Filter löschen

recursively calculated variace covariance matrix

1 Ansicht (letzte 30 Tage)
gsourop
gsourop am 4 Nov. 2016
Bearbeitet: Matt J am 4 Nov. 2016
Hi all,
I have the following question: I need to calculate for every time t the following equation:
w_t=c*inv(VCV_(t+1))*(m_(t+1)-i_t)
where c is a constant, the variance covariance matrix should be iteratively computed for every time t, m_t is a 6x1 vector and i_t is also a 6x1 vector. I've tried the following but I get an error
for t=1:432;
VCV(t)=(x(t,1:6)-y(t,:))*(x(t,1:6)-y(t,:))';
end;
where x and y are 432x6 matrices I am supposed to get 432 6x6 VCV matrices. So I can put them in the first equation. Would it be more correct if I calculated the first equation like this:
for t=1:432;
w(t) = c* inv((x(t,1:6)-y(t,:)) * (x(t,1:6)-y(t,:))') * (m(t+1)-i(t)) ;
end;
Thank you very much in advance

Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by