psse_parse_line

psse_parse_line(str, t)

psse_parse_line() - Reads and parses a single line from a PSS/E RAW data file.

[DATA, COMMENT] = PSSE_PARSE_LINE(FID)
[DATA, COMMENT] = PSSE_PARSE_LINE(FID, TEMPLATE)
[DATA, COMMENT] = PSSE_PARSE_LINE(STR)
[DATA, COMMENT] = PSSE_PARSE_LINE(STR, TEMPLATE)

Parses a single line from a PSS/E RAW data file, either directly read
from the file, or passed as a string.

Inputs:
    FID :       (optional) file id of file from which to read the line
    STR :       string containing the line to be parsed
    TEMPLATE :  (optional) string of characters indicating how to
                interpret the type of the corresponding column, options
                are as follows:
            d, f or g : integer floating point number to be converted
                via SSCANF with %d, %f or %g, respectively.
            D, F or G : integer floating point number, possibly enclosed
                in single or double quotes, to be converted via
                SSCANF with %d, %f or %g, respectively.
            c or s : character or string, possibly enclosed in single
                or double quotes, which are stripped from the string
        Note:   Data columns in STR that have no valid corresponding
                entry in TEMPLATE (beyond end of TEMPLATE, or a character
                other than those listed, e.g. '.') are returned as a
                string with no conversion. TEMPLATE entries for which
                there is no corresponding column are returned as NaN or
                empty string, depending on the type.
Outputs:
    DATA :      a cell array whose elements contain the contents of
                the corresponding column in the data, converted
                according to the TEMPLATE.
    COMMENT :   (optional) possible comment at the end of the line