Calcurate Kalman gain matrix 2012/03/14 M.Fukushima
0001 function [KW, GSB, SB] = calc_kalman_gain2(G, Gt, S, Cov, flag_pinv) 0002 % 0003 % Calcurate Kalman gain matrix 0004 % 0005 % 2012/03/14 M.Fukushima 0006 0007 GSG = G*S*Gt; 0008 SB = GSG + Cov; % Sigma_B 0009 if flag_pinv, SB_inv = pinv( SB ); % Sigam_B^{-1} 0010 else SB_inv = inv(SB); end 0011 GSB = Gt*SB_inv; % Ga' * Sigma_B^{-1} 0012 0013 % Kalman gain matrix 0014 KW = S*GSB;