function [ztrata control y b P]=sloz(apriori,system) [H u]=load_H; %for i=1:size(H,1); % plot(H(i,:,1),H(i,:,2),'g.'); end %plot(H(1,:,1),H(1,:,2),'g.'); hold on %plot(H(1,index,1), H(1,index,2),'r+'); %plot(eta_tilda, beta_tilda,'b.'); hold off [ztrata control y b P]=rizeni(H,u,system,apriori); end function next=kalman_filter(state,u,sigma) %OK %prostor hyperstavu - kazdy bod ma souradnice (y, b, P) %realization next(1)=state(1)+(state(2)+state(3)*randn)*u+sigma*randn; %kalman K=u*state(3)/(state(3)*u^2+sigma^2); next(2)=state(2)+K*(next(1)-state(1)-state(2)*u); next(3)=(1-K*u)*state(3); end