function Mat_G=FormG(Volt,PVi,PGi,PG,QG,PD,QD,Loadi) Mat_G=[ sparse(PD(Loadi)); sparse(QD(Loadi)); Volt'; ]; end