File: save.man

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (60 lines) | stat: -rw-r--r-- 1,380 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.TH save 1 "April 1993" "Scilab Group" "Scilab Function"
.so ../sci.an
.SH NAME
save - saving variables in binary files
.SH CALLING SEQUENCE
.nf 
save(filename [,x1,x2,...,xn])
save(fd [,x1,x2,...,xn])
.fi
.SH PARAMETERS
.TP 10
filename 
: character string containing the path of the file
.TP 10
fd
: a file descriptor given by a call to mopen
.TP 10
xi
: arbitrary Scilab variable(s) 
.SH DESCRIPTION
The \fVsave\fR command can be used to save Scilab current variables 
 in a binary file. The file can be given either by its paths or
by its descriptor previously given by \fVmopen\fR.
.LP
\fVsave(filename)\fV saves all current variables in the file defined
by  \fVfilename\fR.
.LP
\fVsave(fd)\fV saves all current variables in the file defined
by  the descriptor \fVfd\fR.
.LP
\fVsave(filename,x,y)\fR or \fVsave(fd,x,y)\fR saves only named
variables \fVx\fR and \fVy\fR.
.LP
Saved  variables can be reloaded by the \fVload\fR command.
.SH EXAMPLES
.nf
a=eye(2,2);b=ones(a);
save('val.dat',a,b);
clear a
clear b
load('val.dat','a','b');

// sequential save into a file
fd=mopen('TMPDIR/foo','wb')
for k=1:4, x=k^2;save(fd,x,k),end
mclose(fd)
fd=mopen('TMPDIR/foo','rb')
for i=1:4, load(fd,'x','k');x,k,end
mclose(fd)

// appending variables to an old save file
fd=mopen('TMPDIR/foo','r+')
mseek(0,fd,'end') 
lst=list(1,2,3)
save(fd,lst)
mclose(fd)

.fi
.SH SEE ALSO
load, mopen