Home > Objects > @iFunc > saveas.m

iFit/saveas

PURPOSE ^

f = saveas(s, filename, format, options) : save iFunc object into various data formats

SYNOPSIS ^

function [filename,format] = saveas(a, varargin)

DESCRIPTION ^

 f = saveas(s, filename, format, options) : save iFunc object into various data formats

   @iFunc/saveas function to save models
     This function saves the content of iFunc objects. The default format is 'yaml'.
   saveas(iFunc,'formats')
     prints a list of supported export formats.
   saveas(iFunc,'file.ext')            determine file format from the extension
   saveas(iFunc,'file','format')       sets file format explicitly
     To load back a model from an m-file, type its file name at the prompt.
     To load back a model from an mat-file, type 'load filename.mat' at the prompt.
     To load back a model from a YAML, JSON, XML, use iFunc('filename')

 input:  s: object or array (iFunc)
         filename: name of file to save to. Extension, if missing, is appended (char)
                   If the filename already exists, the file is overwritten.
                   If given as filename='gui', a file selector pops-up
         format: data format to use (char), or determined from file name extension
           'json' save as JSON JavaScript Object Notation, ascii
           'm'    save as a flat Matlab .m file (a function which returns an iFunc object or structure)
           'mat'  save as a '.mat' binary file (same as 'save', RECOMMENDED)
           'xml'  save as XML file, ascii.
           'yaml' save as YAML format, ascii, RECOMMENDED, DEFAULT
         as well as other lossy formats
           'fig'  save as a Matlab figure
           'gif','bmp','png','tiff','jpeg','ps','pdf','ill','eps' save as an image
           'hdf4' save as an HDF4 immage
           'html' save as Hypertext Markup Language document, appended to any existing document.

           'gui' when filename extension is not specified, a format list pops-up
         options: specific format options, which are usually plot options
           default is 'view2 axis tight'

 output: f: filename(s) used to save data (char)
 ex:     b=saveas(a, 'file', 'yaml'); c=iFunc(b);
         b=saveas(a, 'file', 'gif', 'axis tight');

 Version: Aug. 22, 2017
 See also iFunc, save

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Tue 22-Aug-2017 11:03:30 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1