close all
itload('../../mpf_test.it')
figure(1);
for i =1:4
	subplot(4,1,i)
	plot(xth(:,i)')
end

figure(2)
StdX = 2*sqrt(VarE);
for i=1:4
	subplot(4,1,i)
	plot(xth(:,i)')
	hold on;
	plot(xthE(:,i)','r')
    plot(xthE(:,i) - StdX(:,i),'r:');
    plot(xthE(:,i) + StdX(:,i),'r:');
	plot(xthM(:,i+4)','g')
%	plot(xthV(i,:)','m');
end

figure(3)
StdM = 2*sqrt(VarM);
for i=1:4
	subplot(4,1,i)
	plot(xthM(:,i)')
    hold on
    plot(xthM(:,i)-StdM(:,i),':')
    plot(xthM(:,i)+StdM(:,i),':')
    if i<4
        %set(gca,'XTick',[]);
    else
        xlabel('sample [t]');
    end
    ylabel(['Q(' num2str(i) ',' num2str(i) ')']);
    plot(Qtr(:,i)','--')
end


% figure(3)
% ndat = size(ll,2);
% hold off
% plot(llgrid,ll(:,floor(ndat/3)),':');
% hold on
% plot(llgrid,ll(:,floor(2*ndat/3)),'--');
% plot(llgrid,ll(:,ndat));