[scilab-Users] [SPAM] save variables in an existing file

Adrien Vogt-Schilb vogt at centre-cired.fr
Tue Apr 3 19:31:20 CEST 2012


On 02/04/2012 20:43, Antoine Monmayrant wrote:
> Le 02/04/12 18:00, Adrien Vogt-Schilb a écrit :
>> Hy
>>
>> Does anybody knows a way to save various varibales in a single files 
>> in scilab?
> Yop:
> a=1;b=2;
> save("ab.mat",a,b);
> listvarinfile("ab.mat");
> clear a b;
> load("ab.mat");

hi

Thank you

I meant in an existing file.
The save help page says one can do this:

// creating the file
fd=mopen  <mopen.html>('TMPDIR/foo','wb')
k=1,  x=k^2;
save(fd,x,k)
mclose  <mclose.html>(fd)

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


but the created file is not readable by load

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20120403/f0f5cc7c/attachment.htm>


More information about the users mailing list