How to save and read a saved directory array in Scilab?

0

I am trying to save a data array in Scilab, I use the save ('diretum \ name', 'array') command, but at the time of using LOAD to reuse the array it always carries a variable Boolean, does anyone know where I'm wrong to use save?

    
asked by anonymous 04.09.2017 / 21:31

1 answer

0

An example of how to make the load function work like this:

a=eye(2,2);
b=ones(a);
save('vals.dat',a,b);
clear a
clear b
load('vals.dat','a','b');
disp(a);
disp(b);

// to read the array

    [x]=read(file-desc,m,n,[format])
[x]=read(file-desc,m,n,k,format)

To write an array you can use something like:

    write(file-desc,a,[format])
write(file-desc,a,k,format)
//para colocar a matriz no arquivo
// e depois pode continuar com os procedimentos padrão como load...
    
12.08.2018 / 22:33