#### 3.1 Data Formats

The data ﬁles used by Matpower are Matlab M-ﬁles or MAT-ﬁles which deﬁne and
return a single Matlab struct. The M-ﬁle format is plain text that can be edited using
any standard text editor. The ﬁelds of the struct are baseMVA, bus, branch, gen and
optionally gencost, where baseMVA is a scalar and the rest are matrices. In the matrices,
each row corresponds to a single bus, branch, or generator. The columns are similar to the
columns in the standard IEEE CDF and PTI formats. The number of rows in bus,
branch and gen are , and , respectively. If present, gencost has either
or rows, depending on whether it includes costs for reactive power or
just real power. Full details of the Matpower case format are documented in
Appendix B and can be accessed from the Matlab command line by typing
help caseformat.