Calcurate Kalman gain matrix 2010/07/15 M.Fukushima 2012/12/10 M.Fukushima 2013/06/26 M.Fukushima
0001 function [KW, GSB, SB] = calc_kalman_gain(G, Gt, ax_z, Cov, flag_pinv) 0002 % 0003 % Calcurate Kalman gain matrix 0004 % 0005 % 2010/07/15 M.Fukushima 0006 % 2012/12/10 M.Fukushima 0007 % 2013/06/26 M.Fukushima 0008 0009 GSG = G * vb_repmultiply(Gt, ax_z) ; 0010 SB = GSG + Cov; % Sigma_B 0011 if flag_pinv, SB_inv = pinv( SB ); % Sigam_B^{-1} 0012 else SB_inv = inv(SB); end 0013 GSB = Gt*SB_inv; % Ga' * Sigma_B^{-1} 0014 0015 % Kalman gain matrix 0016 KW = vb_repmultiply(GSB, ax_z);