formmpd.m
来自「可以计算电力系统概率潮流」· M 代码 · 共 33 行
M
33 行
function M=formMpd(bus, line, nswing)
% form relationship matrix between Pline and Delta
% subroutine "proind" find the program index
glo_var
M=zeros(nline, nbus-1);
for i=1:nline
frompos=line(i,1);
topos=line(i,2);
% line(i,6) is the reactance line(i,3) is the number of lines
x=line(i,6)/line(i,3);
startpos=FindPos(bus, frompos);
if (startpos>nswing)
M(i,startpos-1)=1.0/x;
elseif (startpos<nswing)
M(i,startpos)=1.0/x;
end
endpos=FindPos(bus, topos);
if (endpos>nswing)
M(i,endpos-1)=-1.0/x;
elseif(endpos<nswing)
M(i,endpos)=-1.0/x;
end
end
return
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?