- function generatezk
- try
- load inidata;
- catch
- msgbox('The filter has not been initialized!','Warning','warn','modal');
- return
- end
- ti=get(findobj(gcf,'tag','time'),'userdata');
- sigma0=sqrt(diag(P0));
- sigmaw=sqrt(diag(Q));
- sigmav=sqrt(diag(R));
- X=normrnd(X0,sigma0);
- for k=1:ti(2)+1
- w=normrnd(0,sigmaw);
- v=normrnd(0,sigmav);
- Zkk{k}=H*X+v;
- X=A*X+B*w;
- end
- save fZk Zkk;