Although the commands save and load are convenient, one has much more control over the transfer of data between files and Scilab by using the commands read and write . These two commands work similarly to the read and write commands found in Fortran. The syntax of these two commands is as follows.
--> x=[1 2 %pi;%e 3 4]
x =
! 1. 2. 3.1415927 !
! 2.7182818 3. 4. !
--> write('x.dat',x)
--> clear x
--> xnew=read('x.dat',2,3)
xnew =
! 1. 2. 3.1415927 !
! 2.7182818 3. 4. !
Notice that read specifies the number of rows and columns
of the matrix x.
Complicated formats can be specified.