Skip to content
Snippets Groups Projects

Adds the Zflag option in the riccati_update mex and calls the latter in matlab/likelihood/kalman_filter.m

Closed Normann Rion requested to merge normann/dynare:riccati_equation into master
2 unresolved threads
Compare and
3 files
+ 138
39
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -211,10 +211,10 @@ while notsteady && t<=last
@@ -211,10 +211,10 @@ while notsteady && t<=last
likk(s) = log_dF+transpose(v)*iF*v;
likk(s) = log_dF+transpose(v)*iF*v;
if Zflag
if Zflag
K = P*Z'*iF;
K = P*Z'*iF;
Ptmp = T*(P-K*Z*P)*transpose(T)+QQ;
Ptmp = riccati_update(Zflag, P, T, K, Z, QQ);
else
else
K = P(:,Z)*iF;
K = P(:,Z)*iF;
Ptmp = T*(P-K*P(Z,:))*transpose(T)+QQ;
Ptmp = riccati_update(Zflag, P, T, K, P(Z,:), QQ);
end
end
tmp = (a+K*v);
tmp = (a+K*v);
if analytic_derivation
if analytic_derivation
Loading