一个初学者急求帮忙纠错!!!
有一个小程序:function [X_,Kg,P]=b_xingshili (A,C,Q,R,Y)clear
A=[1,1;0,1];
C=[1,0];
Q=0.1;
R=1;
T=[0.5;1];
X_=ones(2,25);
X_(:,1)=[9.53434;-0.00029];
Y=textread('C:\MATLAB7\work\shiyonglizi\b_xingdate.txt');
[os N] = size(Y);%Y是1行25列的矩阵
ss = size(A,1);
P_=ones(ss,ss,N);
P(:,:,1)=[1.1,-0.3;-0.3,0.1];
P=ones(ss,ss,N);
Kg=ones(2,N);
for k=2:N
P_(:,:,k)=A*P(:,:,k-1)*A'+T*Q*T';
Kg(:,k)=P_(:,:,k)*C'/(C*P_(:,:,k)*C'+R);
X_(:,k)=A*X_(:,k-1)+Kg(:,k)*(Y(:,k)-C*A*X_(:,k-1));
P(:,:,k)=P_(:,k)-Kg(:,k)*C* P_(:,k);
end
k=1:N;
plot(k,X_,'r',k,Y,'g',k,X_,'b')
调试时说这行: X_(:,k)=A*X_(:,k-1)+Kg(:,k)*(Y(k,:)-C*A*X_(:,k-1))
Missing variable or function
请高人指点,急待帮助!!!!