I wrote a few days ago, in response to Klára Major's report of
problems with gretl-octave I/O on Windows:
The functions gretl_loadmat() and gretl_export() have an optional
second argument: set it to zero and gretl will not force use of your
AddData\Roaming subdirectory for input and output.
matrix m = I(3)
mymat = gretl_loadmat("c:/nice/path/m.mat", 0);
mymat *= 2;
gretl_export(mymat, "c:/nice/path/mymat", 0);
gotback = mread("c:/nice/path/mymat")
That's right, however I realized two things:
(1) The business of the optional trailing argument to gretl_loadmat
and gretl_export was not mentioned in the section of the Gretl
User's Guide dealing with Octave (though it was mentioned in the
Python and Julia sections). That's now fixed in git.
(2) Pretty obviously, if the user gives an absolute path then that
should automatically be respected, with no need to append a trailing
0 argument to prevent the prepending of "dotdir". That too is now
fixed in git (and snapshots).
Show replies by date