dcpf

dcpf(B, Pbus, Va0, ref, pv, pq)

dcpf() - Solves a DC power flow.

[VA, SUCCESS] = DCPF(B, PBUS, VA0, REF, PV, PQ) solves for the bus
voltage angles at all but the reference bus, given the full system
B matrix and the vector of bus real power injections, the initial
vector of bus voltage angles (in radians), and column vectors with
the lists of bus indices for the swing bus, PV buses, and PQ buses,
respectively. Returns a vector of bus voltage angles in radians.

See also rundcpf(), runpf().