function K=KF(x,dt)
clear s
if ~exist('dt')
dt=1/1000;
end
s.dt=dt;
s.x = [0  ;
       0  ;
       0 ];
s.A = [1 dt 0*.5*dt^2;
       0  1   0*dt   ;
       0  0   0*1   ];

% Define a process noise (stdev) of 2 volts as the car operates:
s.Q = [1 0 0;
        0 power(2/dt,2) 0;
        0 0 power(3/dt/dt,2)]; % variance, hence stdev^2
% Define the voltimeter to measure the voltage itself:
s.H = [1 0 0];
% Define a measurement error (stdev) of 2 volts:
s.R = 2^2; % variance, hence stdev^2
% Do not define any system input (control) functions:
s.B = 0;
s.u = 0;
% Do not specify an initial state:
%s.x = NaN;
s.P = [1 0 0;0 1 0;0 0 0*1];
s.radKF=3;
s.K=[];
if ~exist('x')
%load x
x=[1:1000]';
end
K=ukazkaKF('nastaveni',s,'data',x);
end