% Written by: % -- % John L. Weatherwax 2005-08-14 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- clc; format rat; M = [ 1/2, 0, 1, 0, 0, 0 ; 1, 1, 0, 0, 0, 0 ; 1/2, 0, 1, 1, 0, 0 ; 1/4, 0, 1/2, 0, 1, 1 ]; C = M*(M.'); % get the parts of C we need for the bayesian update c11 = C(1,1); sigma12 = C(1,2:end); sigma22 = C(2:end,2:end); sigma12 * inv(sigma22)