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