Hello,
I have a Kalman Filter code like this and I get a really plain result. You can check it in the attachment 'deneme'. But I want to get a result like attachment file '32'. What should I do? Please help me I really need it. (dataa file is a part of my data, if you want to try something on it) 🙂
clear allclcP = 1;R = 0.1;XK1 =0;hold ondata=xlsread('dataa');Z=data(1:end,9);uzunluk=length(Z);XK_sakla=[1:uzunluk]; KG_sakla=[1:1:uzunluk];a=0;for y = [1:uzunluk]a=a+1; KG = P/(P+ R);XK = XK1 + (KG*(Z(a)-XK1));P = (1-KG)*P;XK1 = XK;XK_sakla(a) = XK;KG_sakla(a) = KG; endscatter(1:uzunluk,Z,'x','black','Linewidth',1);plot (1:uzunluk , XK_sakla,'blue','Linewidth',1 );xlabel('Number of Observations');ylabel('Value');
Best Answer