

The comment line written at the beginning of text-format data files saved by Query or set the internal variable that specifies the format string used for : val = save_header_format_string () ¶ : old_val = save_header_format_string ( new_val) ¶ : old_val = save_header_format_string ( new_val, "local") ¶ If file size is a concern, it is probably better to choose aīinary format for saving data rather than to reduce the precision of the saved The default value is 17 which is the minimum necessary for the lossless savingĪnd restoring of IEEE-754 double values For IEEE-754 single values the minimum Query or set the internal variable that specifies the number of digits to : val = save_precision () ¶ : old_val = save_precision ( new_val) ¶ : old_val = save_precision ( new_val, "local") ¶ See also: save, save_header_format_string, save_precision. The original variable value is restored when exiting the function. Variable is changed locally for the function and any subroutines it calls. When called from inside a function with the "local" option, the See the documentation of the save command for other choices. The default value is "-text" (Octave’s own text-based file format). Query or set the internal variable that specifies the default optionsįor the save command, and defines the default format. : val = save_default_options () ¶ : old_val = save_default_options ( new_val) ¶ : old_val = save_default_options ( new_val, "local") ¶ There are three functions that modify the behavior of save. See also: load, save_default_options, save_header_format_string, save_precision, dlmread, csvread, fread. Saves the variable ‘ a’ and all variables beginning with ‘ b’ to the If the variable is restored at a later time using ‘ load’, it will be struct modifier (but not in the struct name itself).Įxcept when using the MATLAB binary data file format or the ‘ -ascii’įormat, saving global variables also saves the global status of the variable.

Wildcards may also be used in the field name specifications when using the

For example, the pattern will match all lower and Is ! or ^, match all characters except those specified by Match the list of characters specified by list. The list of variables to save may use wildcard patterns (glob patterns)Ĭontaining the following special characters: Was built with a link to the zlib libraries. This works on files that areĬompressed with gzip outside of Octave, and gzip can also be used to convert Use the gzip algorithm to compress the file. Save the data in MATLAB’s v4 binary data format. Save the data in MATLAB’s v6 binary data format. Save the data in MATLAB’s v7 binary data format. Octave does not yet implement MATLAB’s v7.3 binary data format. Save the data in Octave’s text data format. Use thisįormat only if you know that all the values to be saved can be

Save the data in HDF5 format but using only single precision. Supercomputing Applications at the University of Illinois.) This format is onlyĪvailable if Octave was built with a link to the HDF5 libraries. (HDF5 is a free, portable, binary format developed by the National Center for Use this format only if you know that all the values to be saved can Save the data in Octave’s binary data format but using only single precision. Save the data in Octave’s binary data format. Store numbers in double-precision format. Additional options for the -ascii format are Numbers are stored in single-precision format and separated by Matrix must be 2-D and only the real part of any complex value is written to Save a matrix in a text file without a header or any other information. Is 0, otherwise return the output in a character string.Īppend to the destination instead of overwriting. If called with a filename of "-", write the output to stdout if nargout …) must be specified as character strings. Then the options, file, and variable name arguments ( v1, If save is invoked using the functional form Options that modify the output format override the format specified by Valid options for the save command are listed in the following table. Option can be combined with specific field names f1, f2, … to They were variables with the corresponding field names. Modifier is used then the fields of the scalar struct are saved as if Syntax can be used to specify the variables to save.
#MATLAB TEXTSCAN READ UNTIL EMPTY LINE FULL#
Otherwise, full variable names or pattern If no variable names are listed, Octave saves all the The special filename ‘ -’ may be used to return the content of the Save the named variables v1, v2, …, in the file file. : save file ¶ : save options file ¶ : save options file v1 v2 … ¶ : save options file -struct STRUCT ¶ : save options file -struct STRUCT f1 f2 … ¶ : save - v1 v2 … ¶ : str = save ("-", " v1", " v2", …) ¶
