tracy-1
2008-11-19, 15:51
我自己编写的一个状态估计程序,针对的是电力系统,选了一个四节点的系统作为例子,用的是matpower,不知道有没有搞这一方面的。
主程序为state_est_bus4.m, 运行后的错误提示为:
??? Index exceeds matrix dimensions.
Error in ==> Hx_f at 69
thetaij = (Xtheta(i) - Xtheta(find(bus(:,1)==bus_conn(j))))/180*pi; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Error in ==> myfun at 12
[Pi, Qi, Pij, Qij, Ueq, Coneq, Coneq1, Ieq, Ieq1, h] = Hx_f(X);
Error in ==> fsolve at 176
fuser = feval(funfcn{3},x,varargin{:});
Error in ==> state_est_bus4 at 63
[X,fval,exitflag,output] = fsolve(@myfun,X0,options);
程序只运行到这就出错了,如果后面还有错请不要见笑。
程序放在附件中,希望大家多多帮忙。
主程序为state_est_bus4.m, 运行后的错误提示为:
??? Index exceeds matrix dimensions.
Error in ==> Hx_f at 69
thetaij = (Xtheta(i) - Xtheta(find(bus(:,1)==bus_conn(j))))/180*pi; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Error in ==> myfun at 12
[Pi, Qi, Pij, Qij, Ueq, Coneq, Coneq1, Ieq, Ieq1, h] = Hx_f(X);
Error in ==> fsolve at 176
fuser = feval(funfcn{3},x,varargin{:});
Error in ==> state_est_bus4 at 63
[X,fval,exitflag,output] = fsolve(@myfun,X0,options);
程序只运行到这就出错了,如果后面还有错请不要见笑。
程序放在附件中,希望大家多多帮忙。