savechgtab

savechgtab(fname, chgtab, warnings)

savechgtab() - Save a change table to a file.

SAVECHGTAB(FNAME, CHGTAB)
SAVECHGTAB(FNAME, CHGTAB, WARNINGS)
FNAME = SAVECHGTAB(FNAME, ...)

Writes a CHGTAB, suitable for use with APPLY_CHANGES to a file
specified by FNAME. If FNAME ends with '.mat' it saves CHGTAB
and WARNINGS to a MAT-file as the variables 'chgtab' and 'warnings',
respectively. Otherwise, it saves an M-file function that returns
the CHGTAB, with the optional WARNINGS in comments.

Optionally returns the filename, with extension added if necessary.

Input:
    FNAME :  name of the file to be saved
    CHGTAB :  change table suitable for use with APPLY_CHANGES
    WARNINGS : optional cell array of warning messages (to be
                included in comments), such as those returned by
                PSSECON2CHGTAB

Output(s):
    FNAME :  name of the file, with extention added if necessary