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