th_autocovariances.m: fix matrix dimension

kalman-mex
Johannes Pfeifer 2023-09-07 18:09:28 +02:00
parent f2f1c48baf
commit c063d53646
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ end
if local_order == 2 % mean correction for 2nd order with no filters; other cases are error out above
if ~isempty(index_states)
Ex = (dr.ghs2(index_states)+dr.ghxx(index_states,:)*variance_states(:)+dr.ghuu(index_states,:)*M_.Sigma_e(:))/2;
Ex = (eye(length(M_.nspred))-ghx(index_states,:))\Ex;
Ex = (eye(M_.nspred)-ghx(index_states,:))\Ex;
Gamma_y{nar+3} = NaN*ones(nvar, 1);
Gamma_y{nar+3}(stationary_vars) = ghx(index_stationary_vars,:)*Ex+(dr.ghs2(index_stationary_vars)+dr.ghxx(index_stationary_vars,:)*variance_states(:)+...
dr.ghuu(index_stationary_vars,:)*M_.Sigma_e(:))/2;