[GAP Forum] saving variables to a file

R.N. Tsai r_n_tsai at yahoo.com
Tue Jun 14 04:52:58 BST 2016


Dear GAP forum,
I have same fairly large matrices that take a long time to calculate. Is there a way to save these efficiently?I read about saving the workspace but that won't help with this; I have many matrices and I want to load morethan one at a time. I tried printing to a text file but that takes a very long time because of the size of the matrices.
Here's how I would have done this in Ocatave/Matlab :
M1=(results of long calculations)save('M1.mat','M1);M2=...save('M2.mat','M2);
so in the future I can bring up these matrices into gap like this  :
load('M1.mat','M1')
load('M2.mat','M2')

and now I can process both say M3=M1+M2,....in the same gap session...
Any suggestions?
Also, is there an efficient way to pass data between gap and Octave/Matlab?
Thanks,R.N.



More information about the Forum mailing list