On Thu, 28 Jan 2010, Ignacio Diaz-Emparanza wrote:
El jue, 28-01-2010 a las 12:14 +0100, Riccardo (Jack) Lucchetti
escribió:
> On Thu, 28 Jan 2010, Ignacio Diaz-Emparanza wrote:
>
> > I was trying to respond to the question "How to read a matrix from a
> > text file" in the gretl wiki. I remembered the command "mread"
so,
> > having the matrix {1, 2; 3, 4} saved in file Bm.mat in my gretl working
> > directory I wrote the script:
> >
> > <script>
> > nulldata 50
> > B = mread("Bm.mat")
> > B
> > </script>
> >
> > I was surprised obtaining the output "B: matrix is NULL" (BTW this
> > string should be marked for translation). Then I looked at this more
> > carefully and finally I deduced that "mread" does not work until
> > "mwrite" has been used !!
>
> I can't reproduce this behaviour here. Are you using CVS?
Yes. Gretl in Spanish downloaded from current CVS on Ubuntu
Linux 9.10
I'm able to reproduce the problem in the case where the gretl
working directory is pre-set to a specific location that is not
the same as the shell's current directory, and the matrix file to
be read is in that pre-set directory.
It seems that doing an "mwrite" causes gretl to "chdir" to the
pre-set working directory, after which the original matrix file
is found. I should have a fix for this shortly.
Allin.