function [L] = makelike2(thet,y); q1=thet(1); q2=thet(2); m=thet(3); sig=thet(4); F = [0 0 0; 1 0 0; 0 1 0]; H = [1 q1 q2]; Q = diag([sig 0 0]); R = 0; initx = [y(1)-m;0;0]; initV = 0.00000001*eye(3); [xfilt, Vfilt, VVfilt, loglik] = kalman_filter(y-m, F, H, Q, R, initx, initV); L=-loglik;