www.pudn.com > Kalman_matlab00000.rar > drawing.m, change:2003-10-29,size:352b


function drawing(P_1,P,X_1,X,ii,co,si) 
if si==1 
    t1=sqrt(diag(P_1)); 
    t2=sqrt(diag(P)); 
    for i=1:length(co) 
      t(i,1)=t1(co(i)); 
      t(i,2)=t2(co(i)); 
    end 
     
elseif si==2 
    for i=1:length(co) 
      t(i,1)=X_1(co(i)); 
      t(i,2)=X(co(i)); 
    end 
end 
plot(ii-1:ii,t','EraseMode','none'); 
drawnow