Load a saved variable or a serie of variables
:filename character string containing the path of the file : :fd a file descriptor given by a call to mopen : :xi arbitrary Scilab variable name(s) given as strings. :
The load command can be used to reload in the Scilab session variables previously saved in a file with the ``save`_` command. If the file contains graphic handle variables, the corresponding graphics_entities are drawn.
load(filename) loads the variables saved in file given by its path filename.
load(fd) loads the variables saved in file given by its descriptor fd. This prototype is obsolete and will be removed in Scilab 6.
load(filename,’x’,’y’) loads only variables x,y.
load(fd,’x’,’y’) loads only variables x,y. This prototype is obsolete and will be removed in Scilab 6..
The change of format between the family 5 and 6 of Scilab has been decided because the 5 format is undocumented, not specified and hard to read. SOD (Scilab 6 default format) is fully documented and easy to read through HDF5 libraries or applications.
Note that the written file is portable to other operating systems and architectures (little and big endian).
// Binary format readable up to Scilab 5 family
a=`eye`_(2,2);b=`ones`_(a);
`save`_('vals.dat',a,b);
clear a
clear b
load('vals.dat','a','b');
// Binary format readable by Scilab 5.4.X and Scilab 6 family
a=`eye`_(2,2);b=`ones`_(a);
`save`_("val.sod", "a", "b");
clear a
clear b
load("val.sod", "a", "b");
Version Description 5.0.0 All uimenu or uicontrol handles are also loaded by this function. 5.4.0