SAVECASE(FNAME, CASESTRUCT)
SAVECASE(FNAME, CASESTRUCT, VERSION)
SAVECASE(FNAME, BASEMVA, BUS, GEN, BRANCH)
SAVECASE(FNAME, BASEMVA, BUS, GEN, BRANCH, GENCOST)
SAVECASE(FNAME, BASEMVA, BUS, GEN, BRANCH, AREAS, GENCOST)
SAVECASE(FNAME, COMMENT, CASESTRUCT)
SAVECASE(FNAME, COMMENT, CASESTRUCT, VERSION)
SAVECASE(FNAME, COMMENT, BASEMVA, BUS, GEN, BRANCH)
SAVECASE(FNAME, COMMENT, BASEMVA, BUS, GEN, BRANCH, GENCOST)
SAVECASE(FNAME, COMMENT, BASEMVA, BUS, GEN, BRANCH, AREAS, GENCOST)
FNAME = SAVECASE(FNAME, ...)
Writes a MATPOWER case file, given a filename and data struct or list of
data matrices. The FNAME parameter is the name of the file to be created or
overwritten. If FNAME ends with '.mat' it saves the case as a MAT-file
otherwise it saves it as an M-file. Optionally returns the filename,
with extension added if necessary. The optional COMMENT argument is
either string (single line comment) or a cell array of strings which
are inserted as comments. When using a MATPOWER case struct, if the
optional VERSION argument is '1' it will modify the data matrices to
version 1 format before saving.