9 lines
198 B
Mathematica
9 lines
198 B
Mathematica
|
|
function deltF=func_deltF(wPD,wQD,PD0,PD,QD,QD0,Busnum,Loadi)
|
||
|
|
t3=2*wPD.*(PD(Loadi)-PD0(Loadi));
|
||
|
|
t4=2*wQD.*(QD(Loadi)-QD0(Loadi));
|
||
|
|
deltF=[sparse(t3);
|
||
|
|
sparse(t4);
|
||
|
|
sparse(2*Busnum*3,1);
|
||
|
|
];
|
||
|
|
|
||
|
|
end
|