Skip to content
Snippets Groups Projects
Commit c8568a7f authored by Marco Ratto's avatar Marco Ratto
Browse files

fixed bug: transpose after squeeze

parent cfda6bf6
Branches
Tags
No related merge requests found
...@@ -131,7 +131,7 @@ while notsteady & t<smpl ...@@ -131,7 +131,7 @@ while notsteady & t<smpl
a(:,t+1) = T*atilde(:,t); a(:,t+1) = T*atilde(:,t);
aK(1,:,t+1) = a(:,t+1); aK(1,:,t+1) = a(:,t+1);
for jnk=2:nk, for jnk=2:nk,
aK(jnk,:,t+jnk) = T*squeeze(aK(jnk-1,:,t+jnk-1)); aK(jnk,:,t+jnk) = T*squeeze(aK(jnk-1,:,t+jnk-1))';
end end
P(:,:,t+1) = T*P(:,:,t)*transpose(T)-T*P(:,mf,t)*transpose(K(:,:,t)) + QQ; P(:,:,t+1) = T*P(:,:,t)*transpose(T)-T*P(:,mf,t)*transpose(K(:,:,t)) + QQ;
notsteady = ~(max(max(abs(P(:,:,t+1)-P(:,:,t))))<crit); notsteady = ~(max(max(abs(P(:,:,t+1)-P(:,:,t))))<crit);
...@@ -154,7 +154,7 @@ while t<smpl ...@@ -154,7 +154,7 @@ while t<smpl
a(:,t+1) = T*a(:,t) + K_s*v(:,t); a(:,t+1) = T*a(:,t) + K_s*v(:,t);
aK(1,:,t+1) = a(:,t+1); aK(1,:,t+1) = a(:,t+1);
for jnk=2:nk, for jnk=2:nk,
aK(jnk,:,t+jnk) = T*squeeze(aK(jnk-1,:,t+jnk-1)); aK(jnk,:,t+jnk) = T*squeeze(aK(jnk-1,:,t+jnk-1))';
end end
end end
t = smpl+1; t = smpl+1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment